init without trunk
This commit is contained in:
parent
ed24ac4994
commit
bb809e7233
14652 changed files with 177862 additions and 94817 deletions
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Stof\DoctrineExtensionsBundle\DependencyInjection\Compiler;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
|
||||
class SecurityContextPass implements CompilerPassInterface
|
||||
{
|
||||
public function process(ContainerBuilder $container)
|
||||
{
|
||||
if ($container->has('security.token_storage')) {
|
||||
$args = array(new Reference('security.token_storage'), new Reference('security.authorization_checker'));
|
||||
} elseif ($container->has('security.context')) {
|
||||
$args = array(new Reference('security.context'));
|
||||
} else {
|
||||
return; // SecurityBundle is not configured
|
||||
}
|
||||
|
||||
$defs = array(
|
||||
$container->findDefinition('stof_doctrine_extensions.event_listener.blame'),
|
||||
$container->findDefinition('stof_doctrine_extensions.event_listener.logger'),
|
||||
);
|
||||
|
||||
foreach ($defs as $def) {
|
||||
foreach ($args as $argument) {
|
||||
$def->addArgument($argument);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue