vendor/misd/phone-number-bundle/MisdPhoneNumberBundle.php line 24

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Symfony2 PhoneNumberBundle.
  4.  *
  5.  * (c) University of Cambridge
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace Misd\PhoneNumberBundle;
  11. use Misd\PhoneNumberBundle\DependencyInjection\Compiler\FormPhpTemplateCompilerPass;
  12. use Misd\PhoneNumberBundle\DependencyInjection\Compiler\FormTwigTemplateCompilerPass;
  13. use Misd\PhoneNumberBundle\DependencyInjection\Compiler\ParentLocalesCompilerPass;
  14. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  15. use Symfony\Component\DependencyInjection\ContainerBuilder;
  16. use Symfony\Component\HttpKernel\Bundle\Bundle;
  17. /**
  18.  * Phone number bundle.
  19.  */
  20. class MisdPhoneNumberBundle extends Bundle
  21. {
  22.     /**
  23.      * {@inheritdoc}
  24.      */
  25.     public function build(ContainerBuilder $container)
  26.     {
  27.         parent::build($container);
  28.         $container->addCompilerPass(
  29.           new ParentLocalesCompilerPass(),
  30.           PassConfig::TYPE_BEFORE_REMOVING
  31.         );
  32.         $container->addCompilerPass(new FormPhpTemplateCompilerPass());
  33.         $container->addCompilerPass(new FormTwigTemplateCompilerPass());
  34.     }
  35. }