@param ContainerBuilder $container The service container

@return void
767923
protected function configureKnpPaginatorBundle(ContainerBuilder $container)
    {
        foreach (array_keys($container->getExtensions()) as $name) {
            switch ($name) {
                case 'knp_paginator':
                    $container->prependExtensionConfig(
                        $name,
                        array('template' => array('pagination' => $this->paginationTemplate))
                    );
                    break;
            }
        }
    }
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]
            );
        }
    }
680361
public function process(ContainerBuilder $container)
    {
        foreach ($container->getDefinitions() as $id => $definition) {
            if ($definition->isAbstract()) {
                $container->removeDefinition($id);
                $container->log($this, sprintf('Removed service "%s"; reason: abstract.', $id));
            }
        }
    }
655002
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition($this->collectionServiceId)) {
            return;
        }

        $collection = $this->getCollection($container);

        foreach ($container->findTaggedServiceIds($this->serviceTag) as $id => $attributes) {
            $this->addServiceToCollection($collection, $id);
        }
    }
698582
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new WidgetContentResolverPass());
        //get widgetItems
        $container->addCompilerPass(new WidgetItemPass());
    }
233386
public function process(ContainerBuilder $container)
    {
        $this->container = $container;

        foreach ($container->getDefinitions() as $id => $definition) {
            if ($definition->isSynthetic() || $definition->isAbstract()) {
                continue;
            }

            $this->currentId = $id;

            $this->validateReferences($definition->getArguments());
            $this->validateReferences($definition->getMethodCalls());
            $this->validateReferences($definition->getProperties());
        }
    }
701953
public function process(ContainerBuilder $container)
    {
        $this->container = $container;
        $this->graph = $container->getCompiler()->getServiceReferenceGraph();
        $this->graph->clear();
        $this->lazy = false;
        $this->byConstructor = false;
        $this->definitions = $container->getDefinitions();
        $this->aliases = $container->getAliases();

        foreach ($this->aliases as $id => $alias) {
            $targetId = $this->getDefinitionId((string) $alias);
            $this->graph->connect($id, $alias, $targetId, null !== $targetId ? $this->container->getDefinition($targetId) : null, null);
        }

        try {
            parent::process($container);
        } finally {
            $this->aliases = $this->definitions = [];
        }
    }
134024
public function process(ContainerBuilder $container): void
    {
        $servicesReference = [];
        $serviceIds        = [];

        /**
         * @psalm-var array<string, array<mixed, string>> $taggedServices
         *
         * @var array $taggedServices
         */
        $taggedServices = $container->findTaggedServiceIds('service_bus.service');

        foreach ($taggedServices as $id => $tags)
        {
            /** @psalm-var class-string|null $serviceClass */
            $serviceClass = $container->getDefinition($id)->getClass();

            if (null !== $serviceClass)
            {
                $this->collectServiceDependencies($serviceClass, $container, $servicesReference);

                $serviceIds[] = $serviceClass;

                $servicesReference[\sprintf('%s_service', $serviceClass)] = new ServiceClosureArgument(
                    new Reference($id)
                );
            }
        }

        $container->setParameter('service_bus.services_map', $serviceIds);

        $container
            ->register('service_bus.services_locator', ServiceLocator::class)
            ->setPublic(true)
            ->setArguments([$servicesReference]);
    }
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);
        }
    }
681391
public function process(ContainerBuilder $container)
    {
        $this->container = $container;
        foreach ($container->getDefinitions() as $definition) {
            if ($definition->isSynthetic() || $definition->isAbstract()) {
                continue;
            }

            $definition->setArguments(
                $this->processArguments($definition->getArguments())
            );

            $calls = array();
            foreach ($definition->getMethodCalls() as $call) {
                try {
                    $calls[] = array($call[0], $this->processArguments($call[1], true));
                } catch (RuntimeException $e) {
                    // this call is simply removed
                }
            }
            $definition->setMethodCalls($calls);

            $properties = array();
            foreach ($definition->getProperties() as $name => $value) {
                try {
                    $value = $this->processArguments(array($value), true);
                    $properties[$name] = reset($value);
                } catch (RuntimeException $e) {
                    // ignore property
                }
            }
            $definition->setProperties($properties);
        }
    }
1338139
public function process(ContainerBuilder $container)
    {
        $filters = $container->findTaggedServiceIds(self::TAG_EVENTS_FILTER);
        $filtersRepoDef = $container->getDefinition('smartesb.registry.event_filters');

        foreach ($filters as $serviceName => $tags) {
            $filtersRepoDef->addMethodCall('addDeferringFilter', [new Reference($serviceName)]);
        }
    }
384394
public function process(ContainerBuilder $container)
    {
        if (!$container->hasParameter('cache.logging')) {
            return;
        }

        $config = $container->getParameter('cache.logging');
        if (!$config['enabled']) {
            return;
        }

        $serviceIds = $container->findTaggedServiceIds('cache.provider');

        foreach (array_keys($serviceIds) as $id) {
            $poolDefinition = $container->getDefinition($id);
            if (!method_exists($poolDefinition->getClass(), 'setLogger')) {
                continue;
            }
            $poolDefinition->addMethodCall('setLogger', [new Reference($config['logger'])]);
        }
    }
1255770
public function build(ContainerBuilder $container): void
    {
        parent::build($container);

        $container->addCompilerPass(new AddMenuVotersPass());
        $container->addCompilerPass(new ReplaceMenuMatcherPass());
        $container->addCompilerPass(new ConfigureAmazonMetaPass());
    }
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);
    }
777066
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition($this->subjectService)) {
            return;
        }

        $subjects = $this->findTaggedServices($container, $this->subjectTag, SubjectInterface::class, 'support', false);

        $subjectDefinition = $container->getDefinition($this->subjectService);
        $subjectDefinition->replaceArgument(0, $subjects);
    }
575012
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition('joomla.factory.database.driver.doctrine')) {
            return;
        }

        $doctrineFactory = $container->getDefinition('joomla.factory.database.driver.doctrine');
        $taggedServices = $container->findTaggedServiceIds('joomla.database');

        foreach (array_keys($taggedServices) as $id) {
            $platformDefinition = $container->getDefinition($id);
            $doctrineFactory->addMethodCall('addDatabasePlatform', [ $platformDefinition->getClass() ]);
        }

    }
283090
public function process(ContainerBuilder $container): void
    {
        if ($container->has('ezpublish.image_alias.imagine.cache_resolver')) {
            $container
                ->findDefinition('ezpublish.image_alias.imagine.cache_resolver')
                ->setClass(IORepositoryResolver::class);
        }
    }