<?php
namespace MLDev\BaseBundle;
use MLDev\BaseBundle\DependencyInjection\Compiler\AccessMapCompilerPass;
use MLDev\BaseBundle\DependencyInjection\Compiler\ImagineLoadersCompilerPass;
use MLDev\BaseBundle\DependencyInjection\Compiler\UploaderDirectoryCompilerPass;
use MLDev\BaseBundle\DependencyInjection\MLDevBaseExtension;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use MLDev\BaseBundle\DependencyInjection\Compiler\WidgetCompilerPass;
use function dirname;
/**
* Class MLDevBaseBundle
* @package MLDev\BaseBundle
*/
class MLDevBaseBundle extends Bundle
{
public function getPath(): string
{
return dirname(__DIR__);
}
public function getContainerExtension(): MLDevBaseExtension
{
return new MLDevBaseExtension();
}
/**
* @param ContainerBuilder $container
*/
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass(new AccessMapCompilerPass());
$container->addCompilerPass(new WidgetCompilerPass());
$container->addCompilerPass(new ImagineLoadersCompilerPass());
$container->addCompilerPass(new UploaderDirectoryCompilerPass());
}
}