Adds filter manager for displaying translations gui.

@param string           $repository Elasticsearch repository id.
@param ContainerBuilder $container  Service container.
540546
private function setFiltersManager($repository, ContainerBuilder $container)
    {
        $definition = new Definition(
            'ONGR\FilterManagerBundle\Search\FilterManager',
            [
                new Reference('ongr_translations.filters_container'),
                new Reference($repository),
                new Reference('event_dispatcher'),
                new Reference('jms_serializer')
            ]
        );

        $container->setDefinition('ongr_translations.filter_manager', $definition);
    }
1169174
public function applyRepositoryFilters(array $filters, Repository $repository)
	{
		$repository->setFilters(array_merge($repository->getFilters(), $filters));
	}
103283
public function process(ContainerBuilder $container)
    {
        $this->container = $container;
        $this->buildReader();
        $this->buildUseCaseProxies();
    }
779429
public function process(ContainerBuilder $container)
    {
        if (!$container->has(VoteService::class)) {
            return;
        }
        $definition = $container->getDefinition(VoteService::class);

        $voteFactorieReferences = [];
        $voteFactories = $container->findTaggedServiceIds('expansion.vote_manager.vote');
        foreach ($voteFactories as $voteFactoryId => $data) {
            $voteFactorieReferences[] = new Reference($voteFactoryId);
        }

        $definition->replaceArgument('$voteFactories', $voteFactorieReferences);
    }
943975
public function process(ContainerBuilder $container)
    {
        if ($container->hasDefinition('twig')) {
            $formResources = $container->getParameter('twig.form.resources');
            $formResources[] = 'OpenOrchestraWorkflowFunctionAdminBundle:Form:form_div_layout.html.twig';
            $container->setParameter('twig.form.resources', $formResources);
        }
    }
1017677
protected function loadDefaultTransformers(ContainerBuilder $container)
    {
        $definition = new Definition('Behat\Behat\Transformation\Transformer\RepositoryArgumentTransformer', array(
            new Reference(self::REPOSITORY_ID),
            new Reference(CallExtension::CALL_CENTER_ID),
            new Reference(DefinitionExtension::PATTERN_TRANSFORMER_ID),
            new Reference(TranslatorExtension::TRANSLATOR_ID)
        ));
        $definition->addTag(self::ARGUMENT_TRANSFORMER_TAG, array('priority' => 50));
        $container->setDefinition(self::ARGUMENT_TRANSFORMER_TAG . '.repository', $definition);
    }
856812
private function ensureProviderExists(ContainerBuilder $container, string $provider): void
    {
        $serviceId = "gdbots_ncr.ncr_search.{$provider}";
        if ($container->hasDefinition($serviceId)) {
            return;
        }

        throw new \LogicException(
            sprintf(
                'The "gdbots_ncr.ncr_search.provider" is configured to use "%s" which requires service "%s".',
                $provider,
                $serviceId
            )
        );
    }
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]);
    }
760292
public function process(ContainerBuilder $container)
    {
        if (!$this->enabled($container)) {
            return;
        }

        $mappingDriverDef = $this->getDriver($container);
        $chainDriverDefService = $this->getChainDriverServiceName($container);
        // Definition for a Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain
        $chainDriverDef = $container->getDefinition($chainDriverDefService);
        foreach ($this->namespaces as $namespace) {
            $chainDriverDef->addMethodCall('addDriver', [$mappingDriverDef, $namespace]);
        }

        if (!\count($this->aliasMap)) {
            return;
        }

        $configurationServiceName = $this->getConfigurationServiceName($container);
        // Definition of the Doctrine\...\Configuration class specific to the Doctrine flavour.
        $configurationServiceDefinition = $container->getDefinition($configurationServiceName);
        foreach ($this->aliasMap as $alias => $namespace) {
            $configurationServiceDefinition->addMethodCall($this->registerAliasMethodName, [$alias, $namespace]);
        }
    }
641099
public function process(ContainerBuilder $container)
    {
        $managerName = 'open_orchestra_api.oauth2.authorization_server';
        $tagName = 'open_orchestra_api.oauth2.strategy';

        $this->addStrategyToManager($container, $managerName, $tagName);
    }
787991
public function process(ContainerBuilder $container)
    {
        if (!$container->has(PluginManager::class)) {
            return;
        }

        $pluginsData = [];

        // Find all Plugin services.
        $plugins = $container->findTaggedServiceIds('expansion.plugin');
        foreach ($plugins as $id => $tags) {
            $pluginsData[$id]['dataProviders'] = [];
            foreach ($tags as $attributes) {
                if (isset($attributes['data_provider'])) {
                    $pluginsData[$id]['dataProviders'][] = $attributes['data_provider'];
                }
            }
        }

        // Find the parent services.
        $plugins = $container->findTaggedServiceIds('expansion.plugin.parent');
        foreach ($plugins as $id => $tags) {
            foreach ($tags as $attributes) {
                $pluginsData[$id]['parent'][] = $attributes['parent'];
            }
        }

        // Get the data provider manager service definition to register data providers into.
        $definition = $container->getDefinition(PluginManager::class);

        foreach ($pluginsData as $pluginId => $data)
        {
            $definition->addMethodCall('registerPlugin', [
                    $pluginId,
                    empty($data['dataProviders']) ? [] : $data['dataProviders'],
                    empty($data['parent']) ? [] : $data['parent'],
                ]
            );
        }
    }
930392
public function build(ContainerBuilder $container)
    {
        parent::build($container);
        $container->addCompilerPass(new ApplicationConfigProviderPass());
        $container->addCompilerPass(new TranslationDomainsExtensionsPass());
        $container->addCompilerPass(new ValueObjectVisitorPass());
    }
245672
protected function aliasManagers(ContainerBuilder $container, $managerType)
    {
        $container->setAlias('bruery.user.user_manager', sprintf('bruery.user.%s.user_manager', $managerType));
        $container->setAlias('bruery.user.group_manager', sprintf('bruery.user.%s.group_manager', $managerType));
    }
422473
public function process(ContainerBuilder $container)
    {
        // 1. Register custom repositories with Aggregate repository
        $aggregateRepositoryDefinition = $container->findDefinition(static::$aggregateRepositoryId);
        $customRepositoryTags = $container->findTaggedServiceIds(static::$customRepositoryTag);
        $customRepositoryReferences = [];

        foreach (array_keys($customRepositoryTags) as $id) {
            $customRepositoryReferences[] = new Reference($id);
        }

        $aggregateRepositoryDefinition->replaceArgument(1, $customRepositoryReferences);

        $topEzRepositoryAlias = $container->getAlias(static::$topEzRepositoryAliasId);

        // 2. Re-link eZ Platform's public top Repository alias
        $container->setAlias(static::$renamedTopEzRepositoryAliasId, (string)$topEzRepositoryAlias);

        // 3. Overwrite eZ Platform's public top Repository alias
        // to aggregate Repository implementation
        $container->setAlias(static::$topEzRepositoryAliasId, static::$aggregateRepositoryId);
    }
1254756
private function loadArgumentResolverFactory(ContainerBuilder $container)
    {
        $definition = new Definition('Behat\Behat\Context\Argument\CompositeArgumentResolverFactory');
        $container->setDefinition(self::AGGREGATE_RESOLVER_FACTORY_ID, $definition);
    }
137397
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition('locale_listener')) {
            return;
        }

        $localeListenerDef = $container->getDefinition('locale_listener');
        // Injecting the service container for lazy loading purpose, since all event listeners are instantiated before events are triggered
        $localeListenerDef->addMethodCall('setConfigResolver', array(new Reference('ezpublish.config.resolver')));
        $localeListenerDef->addMethodCall('setLocaleConverter', array(new Reference('ezpublish.locale.converter')));
    }
461173
public function process(ContainerBuilder $container)
    {
        if (!$container->has($this->getCollectorServiceName())) {
            return;
        }

        $definition = $container->findDefinition(
            $this->getCollectorServiceName()
        );

        $taggedServices = $this->findAndSortTaggedServices(
            $this->getTagName(),
            $container
        );

        /*
         * Per each service, add a new method call reference
         */
        foreach ($taggedServices as $service) {
            $definition->addMethodCall(
                $this->getCollectorMethodName(),
                [$service]
            );
        }
    }