vendor/tilleuls/forgot-password-bundle/src/CoopTilleulsForgotPasswordBundle.php line 24

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the CoopTilleulsForgotPasswordBundle package.
  4.  *
  5.  * (c) Vincent CHALAMON <vincent@les-tilleuls.coop>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace CoopTilleuls\ForgotPasswordBundle;
  12. use CoopTilleuls\ForgotPasswordBundle\DependencyInjection\CompilerPass\ApiPlatformCompilerPass;
  13. use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\DoctrineOrmMappingsPass;
  14. use Symfony\Component\DependencyInjection\ContainerBuilder;
  15. use Symfony\Component\HttpKernel\Bundle\Bundle;
  16. /**
  17.  * @author Vincent CHALAMON <vincent@les-tilleuls.coop>
  18.  */
  19. final class CoopTilleulsForgotPasswordBundle extends Bundle
  20. {
  21.     public function getPath(): string
  22.     {
  23.         return \dirname(__DIR__);
  24.     }
  25.     public function build(ContainerBuilder $container): void
  26.     {
  27.         $container->addCompilerPass(new ApiPlatformCompilerPass());
  28.         if (class_exists(DoctrineOrmMappingsPass::class)) {
  29.             $container->addCompilerPass(DoctrineOrmMappingsPass::createXmlMappingDriver([
  30.                 realpath(__DIR__.'/../config/doctrine') => 'CoopTilleuls\ForgotPasswordBundle\Entity',
  31.             ]));
  32.         }
  33.     }
  34. }