Apply configurations to the context manager.

@param ContainerBuilder $container
193192
public function applyContext(ContainerBuilder $container)
    {
        $definition = $container->findDefinition('sonata.block.context_manager');

        foreach ($container->getParameter('sonata_block.blocks') as $service => $settings) {
            if (\count($settings['settings']) > 0) {
                $definition->addMethodCall('addSettingsByType', [$service, $settings['settings'], true]);
            }
        }
        foreach ($container->getParameter('sonata_block.blocks_by_class') as $class => $settings) {
            if (\count($settings['settings']) > 0) {
                $definition->addMethodCall('addSettingsByClass', [$class, $settings['settings'], true]);
            }
        }
    }
481162
public function prepend(ContainerBuilder $container)
    {
        $bundles = $container->getParameter('kernel.bundles');

        if (isset($bundles['DoctrineBundle'])) {
            $mappingConfig = [
                'orm' => [
                    'entity_managers' => [
                        'default' => [
                            'mappings' => [
                                'HMLBDDDBundle' => [
                                    'mapping' => true,
                                    'type' => 'xml',
                                    'dir' => __DIR__.'/../Resources/config/doctrine',
                                    'prefix' => 'HMLB\DDD',
                                    'is_bundle' => false,
                                ],
                            ],
                        ],
                    ],
                ],
            ];

            $container->getExtension('doctrine');
            $container->prependExtensionConfig('doctrine', $mappingConfig);
        }

        $container->prependExtensionConfig(
            'command_bus',
            [
                'command_name_resolver_strategy' => 'named_message',
            ]
        );
        $container->prependExtensionConfig(
            'event_bus',
            [
                'event_name_resolver_strategy' => 'named_message',
            ]
        );
    }
1285122
private function loadParameters(ContainerBuilder $container)
    {
        $container->setParameter('gherkin.paths.lib', $this->getLibPath());
        $container->setParameter('gherkin.paths.i18n', '%gherkin.paths.lib%/i18n.php');
        $container->setParameter(
            'suite.generic.default_settings',
            array(
                'paths'    => array('%paths.base%/features'),
                'contexts' => array('FeatureContext')
            )
        );
    }
82267
public function process(ContainerBuilder $container)
    {
        $this->registerStateExtractors($container);
        $this->registerStateElements($container);
        $this->registerResultModifications($container);
    }
94488
public function process(ContainerBuilder $container)
    {
        $this->compiler = $container->getCompiler();
        $this->formatter = $this->compiler->getLoggingFormatter();

        $container->setDefinitions($this->resolveArguments($container, $container->getDefinitions(), true));
    }
665123
public function process(ContainerBuilder $container): void
    {
        $this->injectParameters($container);

        $handlerDefinition = new Definition(UdpHandler::class, [
            '%service_bus.logger.graylog.udp_host%',
            '%service_bus.logger.graylog.udp_port%',
            '%service_bus.logger.graylog.gzip%',
            '%service_bus.logger.graylog.log_level%',
        ]);

        $container->addDefinitions([UdpHandler::class => $handlerDefinition]);

        (new LoggerCompilerPass())->process($container);

        $loggerDefinition = $container->getDefinition('service_bus.logger');

        $loggerDefinition->addMethodCall(
            'pushHandler',
            [new Reference(UdpHandler::class)]
        );
    }
4576
public function process(ContainerBuilder $container)
    {
        $twig = $container->getDefinition('twig');

        $languages = array('en', 'fr');
        if ($container->hasParameter('open_orchestra_base.administration_languages')) {
            $languages = $container->getParameter('open_orchestra_base.administration_languages');
        }

        $twig->addMethodCall('addGlobal', array('administration_languages', $languages));
    }
859596
public function process(ContainerBuilder $container)
    {
        $baseOptions = [
            'verify' => false
        ];

        // system settings envs
        if (isset($_ENV['HTTP_PROXY']) && !empty($_ENV['HTTP_PROXY'])) {
            $this->setProxy($_ENV['HTTP_PROXY'], 'http');
        }
        if (isset($_ENV['HTTPS_PROXY']) && !empty($_ENV['HTTPS_PROXY'])) {
            $this->setProxy($_ENV['HTTPS_PROXY'], 'https');
        }
        if (isset($_ENV['NO_PROXY']) && !empty($_ENV['NO_PROXY'])) {
            $this->setNoProxyList($_ENV['NO_PROXY']);
        }

        // is there the old setting?
        if (isset($_ENV['GRAVITON_PROXY_CURLOPTS'])) {
            $yamlSettings = Yaml::parse($_ENV['GRAVITON_PROXY_CURLOPTS']);
            if (is_array($yamlSettings) && isset($yamlSettings['proxy'])) {
                $this->setProxy($yamlSettings['proxy']);
            }
            if (is_array($yamlSettings) && isset($yamlSettings['noproxy'])) {
                $this->setNoProxyList($yamlSettings['noproxy']);
            }
        }

        // new settings -> override all
        if (null !== $container->getParameter('graviton.proxy')) {
            $this->setProxy($container->getParameter('graviton.proxy'));
        }
        if (null !== $container->getParameter('graviton.noproxy')) {
            $this->setNoProxyList($container->getParameter('graviton.noproxy'));
        }

        // any proxy?
        if (!empty($this->proxySettings)) {
            $baseOptions['proxy'] = $this->proxySettings;
        }

        $container->setParameter(
            'graviton.core.http.client.options',
            $baseOptions
        );
    }
1153496
public function prepend(ContainerBuilder $container)
    {
        $configs = $container->getExtensionConfig('wizad_settings');

        $processor = new Processor();
        $configuration = $this->getConfiguration($configs, $container);
        $config = $processor->processConfiguration($configuration, $configs);

        $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
        $loader->load('services.xml');

        // Initialize Settings service
        $this->loadStorageEngine($config, $container);

        // Load settings schema
        $this->loadDynamicParametersSchema($config, $container);

        // Inject parameters
        $container->get('wizad_settings.dependency_injection.container_injection_manager')->inject($container);
    }
362167
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        /*
         * Adds compiler passes.
         */
        foreach ($this->getCompilerPasses() as $compilerPass) {
            $container->addCompilerPass($compilerPass);
        }
    }
1267839
protected function overrideEntities(ContainerBuilder $container)
    {
        $plugins = $this->getInstalledPluginBundles($this->kernel);

        foreach ($plugins as $plugin) {
            $configuration = $this->processPlugin($plugin);
            foreach ($configuration as $name => $config) {
                $container
                    ->prependExtensionConfig(
                        $name,
                        $config
                    );
            }
        }

        return $this;
    }
163704
public function process(ContainerBuilder $container)
    {
        $pool = $container->getDefinition('admin.configuration.pool');
        // get tagged services
        $configurations = array();
        foreach ($container->findTaggedServiceIds('admin.configuration') as $id => $attributes) {
            $configurations[$id] = $attributes;
        }
        $pool->addMethodCall('setConfigurations', array($configurations));
    }
578733
protected function prepareContainer(ContainerBuilder $container)
    {
        parent::prepareContainer($container);
        $container->setParameter('smart_core_cms.modules', $this->modules);
        $container->setParameter('smart_core_cms.site_name', $this->siteName);
    }
323321
public function process(ContainerBuilder $container)
    {
        $this->compiler = $container->getCompiler();
        $this->formatter = $this->compiler->getLoggingFormatter();
        $this->graph = $this->compiler->getServiceReferenceGraph();

        $container->setDefinitions($this->inlineArguments($container, $container->getDefinitions(), true));
    }
26343
public function build(ContainerBuilder $container)
    {
        $container->addCompilerPass(new CommandProcessorPass(), PassConfig::TYPE_BEFORE_REMOVING);
        $container->addCompilerPass(new PoolsPass());
        $container->addCompilerPass(new RegisterSerializerDriversPass());
        $container->addCompilerPass(new WorkerRunnersPass());
    }
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;
            }
        }
    }
564014
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new MetaTagHandlersCompilerPass());
        $container->addCompilerPass(new TwigRuntimePass());
    }