vendor/drosalys-web/form-bundle/src/DrosalysWebFormBundle.php line 25

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the form-bundle package.
  4.  *
  5.  * (c) Benjamin Georgeault <https://www.drosalys.fr/>
  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 DrosalysWeb\Bundle\FormBundle;
  11. use DrosalysWeb\Bundle\FormBundle\DependencyInjection\Compiler\CollectionTemplatePass;
  12. use DrosalysWeb\Bundle\FormBundle\DependencyInjection\Compiler\SelectOrCreateTemplatePass;
  13. use DrosalysWeb\Bundle\FormBundle\DependencyInjection\DrosalysWebFormExtension;
  14. use Symfony\Component\DependencyInjection\ContainerBuilder;
  15. use Symfony\Component\HttpKernel\Bundle\Bundle;
  16. /**
  17.  * Class DrosalysWebFormBundle
  18.  *
  19.  * @author Benjamin Georgeault
  20.  */
  21. class DrosalysWebFormBundle extends Bundle
  22. {
  23.     /**
  24.      * @inheritDoc
  25.      */
  26.     public function getContainerExtension()
  27.     {
  28.         return new DrosalysWebFormExtension();
  29.     }
  30.     /**
  31.      * @inheritDoc
  32.      */
  33.     public function build(ContainerBuilder $container)
  34.     {
  35.         $container->addCompilerPass(new CollectionTemplatePass());
  36.         $container->addCompilerPass(new SelectOrCreateTemplatePass());
  37.     }
  38. }