Configure the security voter if the security middleware is loaded.

@param array $mergedConfig
@param ContainerBuilder $container
197997
private function configureSecurity(array $mergedConfig, ContainerBuilder $container)
    {
        foreach ($mergedConfig['commandbus'] as $commandBusConfig) {
            if (in_array('tactician.middleware.security', $commandBusConfig['middleware'])) {
                return $this->configureCommandSecurityVoter($mergedConfig, $container);
            }
        }
    }
1316465
private function loadClient(ContainerBuilder $container)
    {
        $container->setDefinition(
            self::GUZZLE_CLIENT_ID,
            new Definition(
                'Guzzle\Service\Client',
                array(
                    'baseUrl' => $container->getParameter('guzzle.base_url'),
                    'config' => $container->getParameter('guzzle.parameters')
                )
            )
        );
    }
610631
private function configureLogger(array $mergedConfig, ContainerBuilder $container)
    {
        $this->configureLoggerFormatters($container);

        $loggerMiddleware = new Definition(LoggerMiddleware::class, [
            new Reference($mergedConfig['logger_formatter']),
            new Reference('logger')
        ]);
        $loggerMiddleware->setPublic(false);
        $loggerMiddleware->addTag('monolog.logger', ['channel' => 'command_bus']);

        $container->setDefinition('tactician.middleware.logger', $loggerMiddleware);
    }
1328320
private function configureTwigBundle(ContainerBuilder $container)
    {
        // Get the twig configurations.
        $name    = 'twig';
        $configs = $container->getExtensionConfig($name);

        // Find any existing configurations and add to it them so when the
        // configs are merged they do not overwrite each other.
        foreach ($configs as $config) {
            if (isset($config['form_themes'])) {
                $formConfig = ['form_themes' => $config['form_themes']];
            }
        }

        // Update or create the configuration.
        if (!empty($formConfig)) {
            $formConfig['form_themes'][] = $this->formTemplate;
        } else {
            $formConfig = [
                'form_themes' => [$this->formTemplate],
            ];
        }

        // Prepend our configuration.
        $container->prependExtensionConfig($name, $formConfig);
    }
144864
protected function configureTwigBundle(ContainerBuilder $container, array $config)
    {
        if ($container->hasExtension('twig')) {
            $resources = array('LifoTypeaheadBundle:Form:typeahead.html.twig');
            if (Kernel::VERSION_ID >= '20600') {
                $container->prependExtensionConfig('twig', array('form_themes' => $resources));
            } else {
                $container->prependExtensionConfig('twig', array('form' => array('resources' => $resources)));
            }
        }
    }
735035
public function process(ContainerBuilder $container)
    {
        if ($container->has('security.authentication.success_handler')) {
            $container
                ->findDefinition('security.authentication.success_handler')
                ->setClass(AuthenticationSuccessHandler::class);
        }

        if ($container->has('security.authentication.provider.dao')) {
            $container
                ->findDefinition('security.authentication.provider.dao')
                ->setClass(DaoAuthenticationProvider::class);
        }

        if ($container->has('sylius.authentication.success_handler')) {
            $container
                ->findDefinition('sylius.authentication.success_handler')
                ->setClass(AuthenticationSuccessHandler::class);
        }
    }
646855
public function load (array $config, ContainerBuilder $container)
    {
        // parse configuration
        $parsedConfiguration = $this->processConfiguration(new Configuration(), $config);

        // load services
        $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('services.yml');

        // build role collection
        $builder = new RoleCollectionBuilder();

        $roleCollectionDefinition = $container->getDefinition("becklyn.static_roles.role_collection");
        $roleCollectionDefinition->replaceArgument(0, $builder->prepareRoleCollection($parsedConfiguration["roles"]));
    }
1033359
private function configureMapManager($config, ContainerBuilder $container)
    {
        $mapManager = $container->getDefinition('sulu_location.map_manager');

        foreach ($config['enabled_providers'] as $enabledProviderName) {
            $providerConfig = $config['providers'][$enabledProviderName];
            $mapManager->addMethodCall('registerProvider', [
                $enabledProviderName,
                $providerConfig,
            ]);
        }

        foreach ($config['geolocators'] as $geoLocatorName => $geoLocatorOptions) {
            $mapManager->addMethodCall('registerGeolocator', [
                $geoLocatorName,
                $geoLocatorOptions,
            ]);
        }

        $mapManager->addMethodCall('setDefaultProviderName', [$config['default_provider']]);
    }
277643
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new SecurityPass());
        $container->addCompilerPass(new LegacyCachePurgerPass());
    }
1177094
private function configureAsseticBundle(ContainerBuilder $container, array $config)
    {
        $asseticConfig = new AsseticConfiguration();
        $container->prependExtensionConfig('assetic', [
            'bundles' => ['EkynaAdminBundle'],
            'assets' => $asseticConfig->build($config),
        ]);
    }
1004839
private function addMerger(Application $container)
    {
        $this->addMergerAnnotations($container);

        $container['config.merger'] = $container->share(
            function () {
                return new Merger(new AnnotationReader());
            }
        );
    }
641069
protected function loadInternal(array $config, ContainerBuilder $container)
    {
        $loader = new YamlFileLoader(
            $container,
            new FileLocator(__DIR__ . '/../Resources/config')
        );

        $loader->load('services.yml');

        $registry = new Definition(MessageQueueRegistry::class);
        $container->setDefinition('alchemy_queues.registry', $registry);

        $queueConfigurations = $config['queues'];

        if ($config['logger'] != '') {
            $registry->addMethodCall('setLogger', [new Reference($config['logger'])]);
        }

        foreach ($queueConfigurations as $name => $configuration) {
            $targetRegistry = $registry;

            if (isset($configuration['registry'])) {
                $targetRegistry = $container->getDefinition($configuration['registry']);
            }

            $targetRegistry->addMethodCall('bindConfiguration', [$name, $configuration]);
        }
    }
1146774
public function load(array $configs, ContainerBuilder $container)
    {
        $config = $this->processConfiguration(new Configuration(), $configs);

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

        if (isset($config['quicklist'])) {
            $loader->load('quicklist.xml');
            foreach ($config['quicklist'] as $name => $quicklistConfig) {
                $container->getDefinition('zicht_admin.quicklist')
                    ->addMethodCall('addRepositoryConfig', array($name, $quicklistConfig));

                $formResources = $container->getParameter('twig.form.resources');
                $formResources[]= 'ZichtAdminBundle::form_theme.html.twig';
                $container->setParameter('twig.form.resources', $formResources);
            }
        }

        if (isset($config['transactional_listener']) && $config['transactional_listener']['auto']) {
            $loader->load('transactional_listener.xml');

            $container->getDefinition('zicht_admin.transactional_listener')
                ->addArgument($config['transactional_listener']['pattern']);
        }

        if (isset($config['rc'])) {
            $loader->load('rc.xml');
            $container->getDefinition('zicht_admin.controller.rc')->replaceArgument(0, $config['rc']);
        }

        $container->getDefinition('zicht_admin.security.authorization.voter.admin_voter')
            ->replaceArgument(0, $config['security']['mapped_attributes']);
    }
882721
public function load(array $config, ContainerBuilder $container)
    {
        $container->setParameter('maba_oauth_commerce.internal_client.default_base_url', null);

        $container
            ->register(
                'maba_oauth_commerce.normalizer.client_credentials',
                'Maba\OAuthCommerceInternalClient\Normalizer\ClientCredentialsNormalizer'
            )
            ->setArguments(array(new Reference('maba_oauth_commerce.algorithm_manager')))
            ->addTag('maba_oauth_commerce.normalizer')
            ->setPublic(false)
        ;
        $container
            ->setDefinition(
                'maba_oauth_commerce.factory.internal',
                new DefinitionDecorator('maba_oauth_commerce.factory.base')
            )
            ->addMethodCall('setDefaultBaseUrl', array('%maba_oauth_commerce.internal_client.default_base_url%'))
            ->setClass('Maba\OAuthCommerceInternalClient\InternalClientFactory')
        ;
    }
1010632
public function load(array $config, ContainerBuilder $container)
    {
        $configs[] = $this->options;
        $configuration = $this->getConfiguration($configs, $container);
        $config = $this->processConfiguration($configuration, $configs);

        $this->configureStorage($config, $container);
        $this->configureMetadataDriver($config, $container);
        $this->configureEntityManager($config, $container);
    }
337945
public function load(ContainerBuilder $container, array $config)
    {
        $container->setParameter('genesis.failaid.config.screenshotDirectory', $config['screenshotDirectory']);
        $container->setParameter('genesis.failaid.config.screenshotMode', $config['screenshotMode']);

        if (! isset($config['debugBarSelectors'])) {
            $config['debugBarSelectors'] = [];
        }
        $container->setParameter('genesis.failaid.config.debugBarSelectors', $config['debugBarSelectors']);

        if (! isset($config['siteFilters'])) {
            $config['siteFilters'] = [];
        }
        $container->setParameter('genesis.failaid.config.siteFilters', $config['siteFilters']);

        $definition = new Definition(Initializer::class, [
            '%genesis.failaid.config.screenshotDirectory%',
            '%genesis.failaid.config.screenshotMode%',
            '%genesis.failaid.config.siteFilters%',
            '%genesis.failaid.config.debugBarSelectors%',
        ]);
        $definition->addTag(ContextExtension::INITIALIZER_TAG);
        $container->setDefinition(self::CONTEXT_INITIALISER, $definition);
    }
538951
protected function loadExceptionManager(ContainerBuilder $container, array $config)
    {
        $definition = new Definition(
            'M6Web\Bundle\ApiExceptionBundle\Manager\ExceptionManager',
            [
                $config['default'],
                $config['exceptions'],
            ]
        );
        $definition->setPublic(true);

        $container->setDefinition($this->getAlias().'.manager.exception', $definition);
    }