DependencyInjection/BaseExtension.php
private function applyMappingParametrization(
        array $config,
        ContainerBuilder $container
    ) {
        if (!$this->mappingBagProvider instanceof MappingBagProvider) {
            return;
        }

        $mappingBagCollection = $this
            ->mappingBagProvider
            ->getMappingBagCollection();

        $mappedParameters = [];
        foreach ($mappingBagCollection->all() as $mappingBag) {
            $entityName = $mappingBag->getEntityName();
            $isOverwritable = $mappingBag->isOverwritable();
            $mappedParameters = array_merge($mappedParameters, [
                $mappingBag->getParamFormat('class') => $isOverwritable
                    ? $config['mapping'][$entityName]['class']
                    : $mappingBag->getEntityNamespace(),
                $mappingBag->getParamFormat('mapping_file') => $isOverwritable
                    ? $config['mapping'][$entityName]['mapping_file']
                    : $mappingBag->getEntityMappingFilePath(),
                $mappingBag->getParamFormat('manager') => $isOverwritable
                    ? $config['mapping'][$entityName]['manager']
                    : $mappingBag->getManagerName(),
                $mappingBag->getParamFormat('enabled') => $isOverwritable
                    ? $config['mapping'][$entityName]['enabled']
                    : $mappingBag->getEntityIsEnabled(),
            ]);
        }

        $container
            ->getParameterBag()
            ->add($mappedParameters);
    }
private function applyMappingParametrization(
        array $config,
        ContainerBuilder $container
    ) {
        if (!$this->mappingBagProvider instanceof MappingBagProvider) {
            return;
        }

        $mappingBagCollection = $this
            ->mappingBagProvider
            ->getMappingBagCollection();

        $mappedParameters = [];
        foreach ($mappingBagCollection->all() as $mappingBag) {
            $entityName = $mappingBag->getEntityName();
            $isOverwritable = $mappingBag->isOverwritable();
            $mappedParameters = array_merge($mappedParameters, [
                $mappingBag->getParamFormat('class') => $isOverwritable
                    ? $config['mapping'][$entityName]['class']
                    : $mappingBag->getEntityNamespace(),
                $mappingBag->getParamFormat('mapping_file') => $isOverwritable
                    ? $config['mapping'][$entityName]['mapping_file']
                    : $mappingBag->getEntityMappingFilePath(),
                $mappingBag->getParamFormat('manager') => $isOverwritable
                    ? $config['mapping'][$entityName]['manager']
                    : $mappingBag->getManagerName(),
                $mappingBag->getParamFormat('enabled') => $isOverwritable
                    ? $config['mapping'][$entityName]['enabled']
                    : $mappingBag->getEntityIsEnabled(),
            ]);
        }

        $container
            ->getParameterBag()
            ->add($mappedParameters);
    }
private function applyMappingParametrization ( array $ config , ContainerBuilder $ container ) { if ( ! $ this -> mappingBagProvider instanceof MappingBagProvider ) { return ; } $ mappingBagCollection = $ this -> mappingBagProvider -> getMappingBagCollection ( ) ; $ mappedParameters = [ ] ; foreach ( $ mappingBagCollection -> all ( ) as $ mappingBag ) { $ entityName = $ mappingBag -> getEntityName ( ) ; $ isOverwritable = $ mappingBag -> isOverwritable ( ) ; $ mappedParameters = array_merge ( $ mappedParameters , [ $ mappingBag -> getParamFormat ( 'class' ) => $ isOverwritable ? $ config [ 'mapping' ] [ $ entityName ] [ 'class' ] : $ mappingBag -> getEntityNamespace ( ) , $ mappingBag -> getParamFormat ( 'mapping_file' ) => $ isOverwritable ? $ config [ 'mapping' ] [ $ entityName ] [ 'mapping_file' ] : $ mappingBag -> getEntityMappingFilePath ( ) , $ mappingBag -> getParamFormat ( 'manager' ) => $ isOverwritable ? $ config [ 'mapping' ] [ $ entityName ] [ 'manager' ] : $ mappingBag -> getManagerName ( ) , $ mappingBag -> getParamFormat ( 'enabled' ) => $ isOverwritable ? $ config [ 'mapping' ] [ $ entityName ] [ 'enabled' ] : $ mappingBag -> getEntityIsEnabled ( ) , ] ) ; } $ container -> getParameterBag ( ) -> add ( $ mappedParameters ) ; }
Apply parametrization for Mapping data.
This method is only applied if the extension implements
EntitiesMappedExtension.

@param array            $config
@param ContainerBuilder $container
Apply parametrization for Mapping data . This method is only applied if the extension implements EntitiesMappedExtension .