Answer the question
In order to leave comments, you need to log in
How to use Bundle inheritance to overwrite bundle parts?
I would like to clarify some points regarding the inheritance of bundles.
I'm reading the FOSUserBundle documentation, it shows how inheritance works.
// src/Acme/UserBundle/AcmeUserBundle.php
namespace Acme\UserBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class AcmeUserBundle extends Bundle
{
public function getParent()
{
return 'FOSUserBundle';
}
}
namespace Acme\UserBundle\Controller;
use FOS\UserBundle\Controller\RegistrationController as BaseController;
class RegistrationController extends BaseController
{
public function registerAction()
{
$response = parent::registerAction();
// ... do custom stuff
return $response;
}
}
Answer the question
In order to leave comments, you need to log in
concerning inheritance of bundles.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question