<?php
namespace EToNBundle;
use EToNBundle\CompilerPass\EventToNotificationCompilerPass;
use EToNBundle\DependencyInjection\EventToNotificationExtension;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class EventToNotificationBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
$container->addCompilerPass(new EventToNotificationCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 100);
}
/**
* Overridden to allow for the custom extension alias.
*/
public function getContainerExtension(): ?ExtensionInterface
{
if (null === $this->extension) {
$this->extension = new EventToNotificationExtension();
}
return $this->extension;
}
public function getPath(): string
{
return \dirname(__DIR__);
}
}