ivan-abdulin

AppKernel.php::registerBundles()

Jul 27th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.47 KB | None | 0 0
  1. public function registerBundles()
  2. {
  3.     $bundles = [
  4.         new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
  5.         new Symfony\Bundle\SecurityBundle\SecurityBundle(),
  6.         new Symfony\Bundle\TwigBundle\TwigBundle(),
  7.         new Symfony\Bundle\MonologBundle\MonologBundle(),
  8.         new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
  9.         new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
  10.         new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
  11.         new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
  12.  
  13.         // Sonata admin
  14.         new \Sonata\CoreBundle\SonataCoreBundle(),
  15.         new \Sonata\BlockBundle\SonataBlockBundle(),
  16.         new \Knp\Bundle\MenuBundle\KnpMenuBundle(),
  17.         new \Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(),
  18.         new \Sonata\TranslationBundle\SonataTranslationBundle(),
  19.         new \Sonata\AdminBundle\SonataAdminBundle(),
  20.         new \Knp\Bundle\MarkdownBundle\KnpMarkdownBundle(),
  21.         new \Sonata\FormatterBundle\SonataFormatterBundle(),
  22.  
  23.         new AppBundle\AppBundle(),
  24.     ];
  25.  
  26.     if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
  27.         $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
  28.         $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
  29.         $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
  30.         $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
  31.     }
  32.  
  33.     return $bundles;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment