I’m new to Symfony2 and i’m following the tutorial on YouTube Tutorial for the Symfony FOSUserBundle (FTW!).
Around min 7.40 or so, it says to add a method called getParent(), in my case
<?php
//src\Monse\UserBundle\UserBundle.php
namespace Monse\UserBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class UserBundle extends Bundle{
public function getParent(){
return 'FOSUserBundle';
}
}
my layout.html.twig looks like this
{# src\Monse\UserBundle\Resources\views\layout.html.twig #}
{% extends '::base.html.twig' %}
{% block body %}
{{block('fos_user_content')}}
{% endblock %}
sadly, it doesn’t work, and i’ve got no idea what i’m doing wrong.
Thank you for your help
Have you enabled your bundles in the kernel?
EDIT : You could rename your bundle MonseUserBundle to be able to distinguish the parent FOSUserBundle from the bundle that overrides it:
And now use this: