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