FOSUserBundle overriding views

Discuss Symfony 2 bundles here

Moderators: dcobalt, tiagojsag

FOSUserBundle overriding views

Postby Mitchel » Thu Jul 12, 2012 6:57 pm

Hello There,

I have a qeustion.
I have 2 bundles:
1: CaravanBundle
2: LepapillonBleuBundle

I want to overriding the Security view in the LepapillonBleuBundle.
The rest of the views like /profile and /profile/edit must be in the CaravanBundle.

But what is the best way to do this?

I was thinking about:
Code: Select all
<?php
namespace MV\CaravanBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class MVCaravanBundle extends Bundle
{
    public function getParent()
    {
        return 'FOSUserBundle';
    }
}
Code: Select all
<?php
namespace MV\LepapillonBleuBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class MVLepapillonBleuBundle extends Bundle
{
    public function getParent()
    {
        return 'MVCaravanBundle';
    }
}


So I can overwrite the Security/login.html.twig file.. but that doesn't works (no errors but just showing the login from the CaravanBundle).
overriding like what wont work, because I also overwrite the configs etc... :(

But how must/can I do this?
Mitchel
Junior Member
 
Posts: 14
Joined: Tue May 29, 2012 3:46 pm

Re: FOSUserBundle overriding views

Postby mjnet » Sun Sep 02, 2012 9:09 pm

Hi,

Don't know if you've already solved your problem.
Anyhow, this should be done pretty easy using the official FOSUserBundle HowTo:
https://github.com/FriendsOfSymfony/FOS ... mplates.md
mjnet
Junior Member
 
Posts: 28
Joined: Tue Jan 03, 2012 11:59 pm


Return to Bundles discussion

Who is online

Users browsing this forum: No registered users and 2 guests