* * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ /** * Bundle. * * @author Fabien Potencier */ class FrameworkBundle extends Bundle { /** * Boots the Bundle. */ public function boot() { if ($this->container->has('error_handler')) { $this->container->get('error_handler'); } if ($this->container->hasParameter('csrf_secret')) { FormConfiguration::setDefaultCsrfSecret($this->container->getParameter('csrf_secret')); FormConfiguration::enableDefaultCsrfProtection(); } } public function registerExtensions(ContainerBuilder $container) { parent::registerExtensions($container); $container->addCompilerPass(new AddSecurityVotersPass()); } }