<?php
namespace CU\SASCommonBundle;
use CU\SASCommonBundle\DependencyInjection\Compiler\FormLookupPass;
use CU\SASCommonBundle\DependencyInjection\Compiler\JobManagerInterfacePass;
use CU\SASCommonBundle\DependencyInjection\Security\CUFactory;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
*
* @author "Cornell University, Student Services IT"
*/
class CUSASCommonBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
parent::build($container);
// register our form lookup typecompiler pass
$container->addCompilerPass(new FormLookupPass());
// register our JobManager interface pass
$container->addCompilerPass(new JobManagerInterfacePass());
// register our security listener
$extension = $container->getExtension('security');
$extension->addSecurityListenerFactory(new CUFactory());
}
}