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

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\DependencyInjection\Extension\ExtensionInterface;
  16. use Symfony\Component\HttpKernel\Bundle\Bundle;
  17. /**
  18.  * Class DrosalysWebFormBundle
  19.  *
  20.  * @author Benjamin Georgeault
  21.  */
  22. class DrosalysWebFormBundle extends Bundle
  23. {
  24.     /**
  25.      * @inheritDoc
  26.      */
  27.     public function getContainerExtension(): ?ExtensionInterface
  28.     {
  29.         return new DrosalysWebFormExtension();
  30.     }
  31.     /**
  32.      * @inheritDoc
  33.      */
  34.     public function build(ContainerBuilder $container): void
  35.     {
  36.         $container->addCompilerPass(new CollectionTemplatePass());
  37.         $container->addCompilerPass(new SelectOrCreateTemplatePass());
  38.     }
  39. }