@param ContainerBuilder $container The service container

@return void
557801
protected function configureKnpMenuBundle(ContainerBuilder $container)
    {
        foreach (array_keys($container->getExtensions()) as $name) {
            switch ($name) {
                case 'knp_menu':
                    $container->prependExtensionConfig(
                        $name,
                        array('twig' => array('template'  => $this->menuTemplate))
                    );
                    break;
            }
        }
    }
731184
public function process(ContainerBuilder $container): void
    {
        if (!$container->hasDefinition(Aggregator::class)) {
            return;
        }

        $aggregatorDefinition = $container->getDefinition(Aggregator::class);
        $taggedServiceIds = $container->findTaggedServiceIds(self::TAG_CONFIG_PROVIDER);

        foreach ($taggedServiceIds as $taggedServiceId => $tags) {
            foreach ($tags as $tag) {
                $key = $tag['key'] ?? $taggedServiceId;
                $aggregatorDefinition->addMethodCall('addProvider', [$key, new Reference($taggedServiceId)]);
            }
        }
    }
235379
public function process(ContainerBuilder $container)
    {
        if ($container->hasDefinition($this->filesystemTag)) {
            $filesystem = new Reference($this->filesystemTag);

            $reportBugCommandDefinition = $container->getDefinition(ReportBugCommand::class);
            $reportBugCommandDefinition->addMethodCall('setFilesystem', [$filesystem]);

            $captureScreenshotsCommandDefinition = $container->getDefinition(CaptureScreenshotsCommand::class);
            $captureScreenshotsCommandDefinition->addMethodCall('setFilesystem', [$filesystem]);

            $removeScreenshotsCommandDefinition = $container->getDefinition(RemoveScreenshotsCommand::class);
            $removeScreenshotsCommandDefinition->addMethodCall('setFilesystem', [$filesystem]);
        }
    }
362167
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        /*
         * Adds compiler passes.
         */
        foreach ($this->getCompilerPasses() as $compilerPass) {
            $container->addCompilerPass($compilerPass);
        }
    }
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'])]);
        }
    }
539426
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new ConfigurationCompilerPass());
        $container->addCompilerPass(new VendorCompilerPass());
    }
857663
public function build(ContainerBuilder $container)
    {
        $this->initAdmingeneratorClassLoader($container);

        parent::build($container);

        $container->addCompilerPass(new ValidatorCompilerPass());
        $container->addCompilerPass(new FormCompilerPass());
    }
103283
public function process(ContainerBuilder $container)
    {
        $this->container = $container;
        $this->buildReader();
        $this->buildUseCaseProxies();
    }
1321203
public function process(ContainerBuilder $container)
    {
        $parameterBag = $container->getParameterBag();

        $parameterReplacer = $container->get(ServiceNames::PARAMETER_REPLACER);

        $parameterReplacer->processParameterBag($parameterBag, $container);
    }
354110
public function process(ContainerBuilder $container)
    {
        $templatesPathMap = $container->hasParameter('ezdesign.templates_path_map')
            ? $container->getParameter('ezdesign.templates_path_map')
            : [];

        $templatesPathMap['admin'][] = realpath(__DIR__ . '/../../Resources/views');

        $container->setParameter('ezdesign.templates_path_map', $templatesPathMap);
    }
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 = [];
        }
    }
399602
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(
            new DocumentMapCompilerPass(),
            PassConfig::TYPE_BEFORE_OPTIMIZATION,
            100
        );
        $container->addCompilerPass(
            new ExtRefMappingCompilerPass(),
            PassConfig::TYPE_BEFORE_OPTIMIZATION,
            5
        );
        $container->addCompilerPass(
            new ExtRefFieldsCompilerPass(),
            PassConfig::TYPE_BEFORE_OPTIMIZATION,
            5
        );
        $container->addCompilerPass(
            new RqlFieldsCompilerPass(),
            PassConfig::TYPE_BEFORE_OPTIMIZATION,
            5
        );
        $container->addCompilerPass(
            new TranslatableFieldsCompilerPass(),
            PassConfig::TYPE_BEFORE_OPTIMIZATION,
            5
        );
        $container->addCompilerPass(
            new DocumentFieldNamesCompilerPass(),
            PassConfig::TYPE_BEFORE_OPTIMIZATION,
            5
        );
        $container->addCompilerPass(
            new ReadOnlyFieldsCompilerPass(),
            PassConfig::TYPE_BEFORE_OPTIMIZATION,
            5
        );
        $container->addCompilerPass(
            new RestrictionFieldsCompilerPass(),
            PassConfig::TYPE_BEFORE_OPTIMIZATION,
            5
        );
        $container->addCompilerPass(
            new RecordOriginExceptionFieldsCompilerPass(),
            PassConfig::TYPE_BEFORE_OPTIMIZATION,
            5
        );
        $container->addCompilerPass(
            new SolrDefinitionCompilerPass(),
            PassConfig::TYPE_BEFORE_OPTIMIZATION,
            5
        );
    }
183960
public function process(ContainerBuilder $container)
    {
        if ($container->hasAlias('api_platform.name_converter') || !$container->hasDefinition('serializer.name_converter.metadata_aware')) {
            return;
        }

        $definition = $container->getDefinition('serializer.name_converter.metadata_aware');

        if (1 >= \count($definition->getArguments()) || null === $definition->getArgument(1)) {
            return;
        }

        $container->setAlias('api_platform.name_converter', 'serializer.name_converter.metadata_aware');
    }
340604
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new VersionCompilerPass(new PrettyVersions()));
        $container->addCompilerPass(new EnvParametersCompilerPass());
        $container->addCompilerPass(new RouteLoaderCompilerPass());
        $container->addCompilerPass(new HttpClientOptionsCompilerPass());
    }
63734
public function process(ContainerBuilder $container)
    {
        $manager = $container->findDefinition(self::MANAGER_ID);

        $serviceIds = $container->findTaggedServiceIds(self::WORKER_RUNNER_TAG);
        foreach ($serviceIds as $serviceId => $tags) {
            $this->addManagerCalls($container, $manager, $serviceId, $tags);
        }
    }
178182
public function process(ContainerBuilder $container)
    {
        if (!$container->has($this->serviceId)) {
            return;
        }
        $definition = $container->findDefinition($this->serviceId);
        $handlers = array();
        $this->collectServiceIds(
            $container,
            $this->tag,
            $this->keyAttribute,
            function ($key, $serviceId, array $tagAttributes) use (&$handlers) {
                if (isset($tagAttributes['method'])) {
                    $callable = [$serviceId, $tagAttributes['method']];
                } else {
                    $callable = $serviceId;
                }
                $handlers[ltrim($key, '\\')] = $callable;
            }
        );
        $definition->replaceArgument(0, $handlers);
    }
1368332
public function process(ContainerBuilder $container)
    {
        $def = $container->getDefinition('zicht_admin.event_propagator');

        foreach ($container->findTaggedServiceIds('zicht_admin.event_propagation') as $id => $attributes) {
            foreach ($attributes as $attribute) {
                $def->addTag('kernel.event_listener', array('event' => $attribute['event'], 'method' => 'onEvent'));
                $def->addMethodCall('registerPropagation', array($attribute['event'], new Reference($id)));
            }
        }
    }