CompilerPass/MappingCompilerPass.php
private function addObjectDirector(
        ContainerBuilder $container,
        MappingBag $mappingBag,
        string $objectManagerAliasName,
        string $objectRepositoryAliasName
    ) {
        $definition = new Definition('Mmoreram\BaseBundle\ORM\ObjectDirector');
        $definition->setArguments([
            new Reference($objectManagerAliasName),
            new Reference($objectRepositoryAliasName),
        ]);
        $definitionName = ltrim(($mappingBag->getContainerPrefix().'.object_director.'.$mappingBag->getEntityName()), '.');
        $container->setDefinition(
            $definitionName,
            $definition
        );
    }
private function addObjectDirector(
        ContainerBuilder $container,
        MappingBag $mappingBag,
        string $objectManagerAliasName,
        string $objectRepositoryAliasName
    ) {
        $definition = new Definition('Mmoreram\BaseBundle\ORM\ObjectDirector');
        $definition->setArguments([
            new Reference($objectManagerAliasName),
            new Reference($objectRepositoryAliasName),
        ]);
        $definitionName = ltrim(($mappingBag->getContainerPrefix().'.object_director.'.$mappingBag->getEntityName()), '.');
        $container->setDefinition(
            $definitionName,
            $definition
        );
    }
private function addObjectDirector ( ContainerBuilder $ container , MappingBag $ mappingBag , string $ objectManagerAliasName , string $ objectRepositoryAliasName ) { $ definition = new Definition ( 'Mmoreram\BaseBundle\ORM\ObjectDirector' ) ; $ definition -> setArguments ( [ new Reference ( $ objectManagerAliasName ) , new Reference ( $ objectRepositoryAliasName ) , ] ) ; $ definitionName = ltrim ( ( $ mappingBag -> getContainerPrefix ( ) . '.object_director.' . $ mappingBag -> getEntityName ( ) ) , '.' ) ; $ container -> setDefinition ( $ definitionName , $ definition ) ; }
Add directors.

@param ContainerBuilder $container
@param MappingBag       $mappingBag
@param string           $objectManagerAliasName
@param string           $objectRepositoryAliasName
Add directors .