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