vendor/kematjaya/base-controller-bundle/src/BaseControllerBundle.php line 16

Open in your IDE?
  1. <?php
  2. namespace Kematjaya\BaseControllerBundle;
  3. use Kematjaya\BaseControllerBundle\Controller\TwigControllerInterface;
  4. use Kematjaya\BaseControllerBundle\Controller\LexikFilterControllerInterface;
  5. use Kematjaya\BaseControllerBundle\Controller\PaginationControllerInterface;
  6. use Kematjaya\BaseControllerBundle\Controller\TranslatorControllerInterface;
  7. use Kematjaya\BaseControllerBundle\CompilerPass\ControllerCompilerPass;
  8. use Symfony\Component\HttpKernel\Bundle\Bundle;
  9. use Symfony\Component\DependencyInjection\ContainerBuilder;
  10. /**
  11.  * @author Nur Hidayatullah <[email protected]>
  12.  */
  13. class BaseControllerBundle extends Bundle
  14. {
  15.     public function build(ContainerBuilder $container
  16.     {
  17.         $container->registerForAutoconfiguration(TwigControllerInterface::class)
  18.                 ->addTag("controller.twig_arguments");
  19.         
  20.         $container->registerForAutoconfiguration(TranslatorControllerInterface::class)
  21.                 ->addTag(TranslatorControllerInterface::CONTROLLER_TAG_NAME);
  22.         
  23.         $container->registerForAutoconfiguration(PaginationControllerInterface::class)
  24.                 ->addTag(PaginationControllerInterface::CONST_TAG_NAME);
  25.         
  26.         $container->registerForAutoconfiguration(LexikFilterControllerInterface::class)
  27.                 ->addTag(LexikFilterControllerInterface::TAGGING_NAME);
  28.         
  29.         $container->addCompilerPass(new ControllerCompilerPass());
  30.         
  31.         parent::build($container);
  32.     }
  33. }