lib/EventToNotificationBundle/src/EventToNotificationBundle.php line 12

Open in your IDE?
  1. <?php
  2. namespace EToNBundle;
  3. use EToNBundle\CompilerPass\EventToNotificationCompilerPass;
  4. use EToNBundle\DependencyInjection\EventToNotificationExtension;
  5. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  6. use Symfony\Component\DependencyInjection\ContainerBuilder;
  7. use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
  8. use Symfony\Component\HttpKernel\Bundle\Bundle;
  9. class EventToNotificationBundle extends Bundle
  10. {
  11.     public function build(ContainerBuilder $container)
  12.     {
  13.         $container->addCompilerPass(new EventToNotificationCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION100);
  14.     }
  15.     /**
  16.      * Overridden to allow for the custom extension alias.
  17.      */
  18.     public function getContainerExtension(): ?ExtensionInterface
  19.     {
  20.         if (null === $this->extension) {
  21.             $this->extension = new EventToNotificationExtension();
  22.         }
  23.         return $this->extension;
  24.     }
  25.     public function getPath(): string
  26.     {
  27.         return \dirname(__DIR__);
  28.     }
  29. }