@param ContainerBuilder $container

@return array
177581
protected function getExtendedConfig(ContainerBuilder $container)
    {
        $configs = array_merge(...$container->getExtensionConfig($this->getAlias()));

        $prependConfig = [];

        $optionMap = [
            'entity_class' => 'audit_log_class',
            'entity_event_resolver' => 'doctrine_event_resolver',
            'doctrine_entities' => 'doctrine_objects',
        ];

        foreach ($optionMap as $oldOption => $newOption) {
            $prependConfig = $this->prependConfigFromOldOption($oldOption, $newOption, $configs, $prependConfig);
        }

        $doctrineConfig = $container->getExtensionConfig('doctrine');

        if (!empty($doctrineConfig) && !isset($configs['doctrine_event_resolver'])) {
            $prependConfig['doctrine_event_resolver'] = 'xiidea.easy_audit.default_doctrine_event_resolver';
        }

        return $prependConfig;
    }
147525
public function process(ContainerBuilder $container)
    {
        $repository = $container->getDefinition(HandlerRepository::class);
        $finder = new BundleNameFinder($container->getParameter('kernel.bundles'));

        $locatableServices = [];

        foreach ($container->findTaggedServiceIds(self::HANDLER_TAG) as $id => $attributes) {
            $repository->addMethodCall('addBundleName', [
                $id,
                $finder->find($container->getDefinition($id)->getClass()),
            ]);

            $locatableServices[$id] = new Reference($id);
        }

        $repository->replaceArgument(0, ServiceLocatorTagPass::register($container, $locatableServices));
    }
837678
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new ValidatorPass());
        $container->addCompilerPass(new FormPass());
        $container->addCompilerPass(new TwigLoaderPass());
    }
1185637
private function getMessageBuilderCollectionServiceidList(ContainerBuilder $container)
    {
        $builderCollectionServiceIdList = [];

        $messageBuilderCollectionListDefinition = $container->findTaggedServiceIds('notification.message_builder_collection');
        foreach ($messageBuilderCollectionListDefinition as $builderCollectionServiceId => $builderCollectionDefinitionTags) {
            foreach ($builderCollectionDefinitionTags as $builderCollectionDefinitionTag) {
                $collectionName = empty($builderCollectionDefinitionTag['collectionName'])
                    ? 'default'
                    : $builderCollectionDefinitionTag['collectionName'];

                $builderCollectionServiceIdList[$collectionName] = $builderCollectionServiceId;
            }
        }

        return $builderCollectionServiceIdList;
    }
379028
public function process(ContainerBuilder $container)
    {
        $this->documentMap = $container->get('graviton.document.map');

        $map = [];
        foreach ($this->documentMap->getDocuments() as $document) {
            $map[$document->getClass()] = $this->getFieldNames($document);
        }
        $container->setParameter('graviton.document.field.names', $map);
    }
70596
public function process(ContainerBuilder $container)
    {
        $this->documentMap = $container->get('graviton.document.map');

        $map = [];
        foreach ($this->documentMap->getDocuments() as $document) {
            $solrFields = $document->getSolrFields();
            if (is_array($solrFields) && !empty($solrFields)) {
                $map[$document->getClass()] = $this->getSolrWeightString($solrFields);
            }
        }

        $container->setParameter('graviton.document.solr.map', $map);
    }
887335
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition(ProviderAggregator::class)) {
            return;
        }

        $providers = [];
        foreach ($container->findTaggedServiceIds('bazinga_geocoder.provider') as $providerId => $attributes) {
            $providers[] = new Reference($providerId);
        }

        $geocoderDefinition = $container->getDefinition(ProviderAggregator::class);
        $geocoderDefinition->addMethodCall('registerProviders', [$providers]);
    }
1073668
protected function getTemplatesSettings(ContainerInterface $container): array
    {
        $tplConfig = $container->get(SettingsProviderInterface::class)->get(TemplatesSettings::class);

        return $tplConfig;
    }
724701
public function process(ContainerBuilder $container)
    {
        $repositoryConfigurations = $container->getParameter('apisearch.repository_configuration');
        foreach ($repositoryConfigurations as $name => $repositoryConfiguration) {
            $this->createAppRepositories(
                $container,
                $name,
                $repositoryConfiguration
            );

            foreach ($repositoryConfiguration['indices'] as $indexName => $indexId) {
                $indexId = (string) $indexId;
                $this->createIndexRepositories(
                    $container,
                    $name,
                    $repositoryConfiguration,
                    $indexId,
                    $indexName
                );
            }
        }
    }
1112815
private function getLockingStorageAliases(ContainerBuilder $container)
    {
        $taggedServices = $container->findTaggedServiceIds('task.lock.storage');

        $result = [];
        foreach ($taggedServices as $id => $tags) {
            foreach ($tags as $tag) {
                $result[$tag['alias']] = $id;
            }
        }

        return $result;
    }
396129
public static function getFirewallNames(Container $container)
    {
        $names = [];
        foreach ($container->getServiceIds() as $serviceId) {
            if ('security.firewall.map.context.' === substr($serviceId, 0, 30)) {
                $names[] = substr($serviceId, 30);
            }
        }

        return $names;
    }
955849
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        /** @var SecurityExtension $extension */
        $extension = $container->getExtension('security');
        $extension->addSecurityListenerFactory(new JoomlaFactory());

        $container->addCompilerPass(new DoctrineCompilerPass());
        $container->addCompilerPass(new OverrideCompilerPass());
        $container->addCompilerPass(new RoutingCompilerPass());
        $container->addCompilerPass(new ModuleCompilerPass());
        $container->addCompilerPass(new AdminMenuCompilerPass());
    }
502433
protected function getChainDriverServiceName(ContainerBuilder $container)
    {
        foreach (['ekino_wordpress.model_manager_name', $this->fallbackManagerParameter] as $param) {
            if ($container->hasParameter($param)) {
                $name = $container->getParameter($param);
                if ($name) {
                    return sprintf($this->driverPattern, $name);
                }
            }
        }

        throw new ParameterNotFoundException('None of the managerParameters resulted in a valid name');
    }
39564
protected function loadRepository(ContainerBuilder $container)
    {
        $definition = new Definition('Behat\Behat\Transformation\TransformationRepository', array(
            new Reference(EnvironmentExtension::MANAGER_ID)
        ));
        $container->setDefinition(self::REPOSITORY_ID, $definition);
    }
785224
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition($this->serviceId)) {
            return;
        }

        $references = [];
        foreach ($container->findTaggedServiceIds($this->tagName) as $id => $tags) {
            $reference = new Reference($id);

            foreach ($tags as $attributes) {
                $references[$attributes[$this->aliasAttribute]] = $reference;
            }
        }

        if (0 === count($references)) {
            return;
        }

        $container->getDefinition($this->serviceId)->replaceArgument($this->argumentNumber, $references);
    }
222101
public function inject(Container $container) : array
    {
        $parameters = $this->arguments;
        foreach ($parameters as &$parameter) {
            $parameter = $this->getParameter($container, $parameter);
        }

        return $parameters;
    }
801748
public function inject(Container $container) : array
    {
        $bindings = $this->bind->getBindings();
        foreach ($bindings as &$interceptors) {
            /* @var string[] $interceptors */
            foreach ($interceptors as &$interceptor) {
                if (\is_string($interceptor)) {
                    $interceptor = $container->getInstance($interceptor, Name::ANY);
                }
            }
        }

        return $bindings;
    }