AppKernel.php 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. use Symfony\Component\HttpKernel\Kernel;
  3. use Symfony\Component\Config\Loader\LoaderInterface;
  4. class AppKernel extends Kernel
  5. {
  6. public function registerBundles()
  7. {
  8. $bundles = array(
  9. new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
  10. new Symfony\Bundle\SecurityBundle\SecurityBundle(),
  11. new Symfony\Bundle\TwigBundle\TwigBundle(),
  12. new Symfony\Bundle\MonologBundle\MonologBundle(),
  13. new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
  14. new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
  15. new Symfony\Bundle\AsseticBundle\AsseticBundle(),
  16. new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
  17. new JMS\AopBundle\JMSAopBundle(),
  18. new JMS\DiExtraBundle\JMSDiExtraBundle($this),
  19. new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
  20. new FOS\UserBundle\FOSUserBundle(),
  21. new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
  22. new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
  23. //new Sonata\jQueryBundle\SonatajQueryBundle(),
  24. //new Sonata\BluePrintBundle\SonataBluePrintBundle(),
  25. //new Sonata\AdminBundle\SonataAdminBundle(),
  26. //new Knp\Bundle\MenuBundle\KnpMenuBundle(),
  27. new Gregwar\ImageBundle\GregwarImageBundle(),
  28. new Muzich\CoreBundle\MuzichCoreBundle(),
  29. new Muzich\UserBundle\MuzichUserBundle(),
  30. new Muzich\IndexBundle\MuzichIndexBundle(),
  31. new Muzich\HomeBundle\MuzichHomeBundle(),
  32. new Muzich\MynetworkBundle\MuzichMynetworkBundle(),
  33. //new Muzich\AdminBundle\MuzichAdminBundle(),
  34. new Muzich\GroupBundle\MuzichGroupBundle(),
  35. new Muzich\FavoriteBundle\MuzichFavoriteBundle(),
  36. new Muzich\CommentBundle\MuzichCommentBundle(),
  37. );
  38. if (in_array($this->getEnvironment(), array('dev', 'test'))) {
  39. $bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
  40. $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
  41. $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
  42. $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
  43. }
  44. return $bundles;
  45. }
  46. public function registerContainerConfiguration(LoaderInterface $loader)
  47. {
  48. $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
  49. }
  50. }