<?php
namespace WAM\Bundle\WebMakerBundle;
use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\DoctrineOrmMappingsPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use WAM\Bundle\CoreBundle\DependencyInjection\Compiler\InjectTaggedServicesPass;
use WAM\Bundle\CoreBundle\DependencyInjection\Compiler\InjectTaggedWithPriorityServicesPass;
use WAM\Bundle\WebMakerBundle\DependencyInjection\CompilerPass\AddCustomTemplatesToBlockBundlePass;
use WAM\Bundle\WebMakerBundle\DependencyInjection\CompilerPass\CollectionBlockFilterPass;
class WAMWebMakerBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
$container->addCompilerPass(
DoctrineOrmMappingsPass::createAnnotationMappingDriver(
['%wam_webmaker_page_class%'],
['%wam_webmaker_page_class_dir%'],
['default', 'orm']
)
);
$container->addCompilerPass(new AddCustomTemplatesToBlockBundlePass());
$container->addCompilerPass(new CollectionBlockFilterPass());
$container->addCompilerPass(
new InjectTaggedWithPriorityServicesPass(
'wam.web_maker.block.updater',
'block_field_updater',
'addUpdater'
)
);
parent::build($container);
}
}