Configures slide show.

@param ContainerBuilder $container
@param                  $config
181299
private function configureSlideShow(ContainerBuilder $container, $config)
    {
        $registry = $container->getDefinition('ekyna_cms.slide_show.registry');

        $container->setParameter('ekyna_cms.slide_show.static', $config['static']);
        $container->setParameter('ekyna_cms.slide_show.themes', $config['themes']);

        $types = $config['types'];

        if (!isset($types['default'])) {
            $types['default'] = [
                'class'   => Type\DefaultType::class,
                'js_path' => 'ekyna-cms/slide-show/type/default',
                'label'   => 'ekyna_cms.slide.type.default.label',
                'config'  => [],
            ];
        }
        if (!isset($types['hero'])) {
            $types['hero'] = [
                'class'   => Type\HeroType::class,
                'js_path' => 'ekyna-cms/slide-show/type/hero',
                'label'   => 'ekyna_cms.slide.type.hero.label',
                'config'  => [],
            ];
        }

        foreach ($types as $name => $c) {
            $class = $c['class'];
            if (class_exists($class)) {
                $id = "ekyna_cms.slide_show.type.{$name}";
                $definition = new Definition($class, []);
                $container->setDefinition($id, $definition);
            } elseif ($container->hasDefinition($class)) {
                $id = $class;
                $definition = $container->getDefinition($class);
                $class = $definition->getClass();
            } else {
                throw new \InvalidArgumentException("Unexpected slide show type '$class'.");
            }

            if (is_subclass_of($class, Type\AbstractType::class)) {
                $definition->addMethodCall('setMediaRepository', [new Reference('ekyna_media.media.repository')]);
                $definition->addMethodCall('setMediaGenerator', [new Reference('ekyna_media.generator')]);
            }

            $definition->addMethodCall('configure', [
                $name,
                $c['label'],
                $c['js_path'],
                isset($c['config']) ? $c['config'] : [],
            ]);

            $registry->addMethodCall('register', [new Reference($id)]);
        }
    }
1079809
protected function configureAsseticBundle(ContainerBuilder $container, array $config)
    {
        if ($container->hasExtension('assetic')) {
            $container->prependExtensionConfig('assetic', array(
                'assets' => array(
                    // apply in twig template via a javascripts tag using "@lifo_typeahead_js"
                    'lifo_typeahead_js' => array(
                        'inputs' => array(
                            $config['typeahead_bsjs_file'],
                            $config['typeahead_js_file'],
                        ),
                        'output' => $config['typeahead_js_output'],
                    ),
                    // apply in twig template via a stylesheets tag using "@lifo_typeahead_css"
                    'lifo_typeahead_css' => array(
                        'inputs' => array(
                            $config['typeahead_css_file'],
                        ),
                        'output' => $config['typeahead_css_output'],
                    )
                )
            ));
        }
    }
1177094
private function configureAsseticBundle(ContainerBuilder $container, array $config)
    {
        $asseticConfig = new AsseticConfiguration();
        $container->prependExtensionConfig('assetic', [
            'bundles' => ['EkynaAdminBundle'],
            'assets' => $asseticConfig->build($config),
        ]);
    }
1001091
public function load(array $config, ContainerBuilder $container)
    {
        $configs[] = $this->options;
        $configuration = $this->getConfiguration($configs, $container);
        $config = $this->processConfiguration($configuration, $configs);

        $container->setParameter('twig.template_dir', $config['template_dir']);

        $container->register('twig.asset_extension', 'Nice\Twig\AssetExtension')
            ->addArgument(new Reference('service_container'))
            ->addTag('twig.extension');

        $container->register('twig.router_extension', 'Nice\Twig\RouterExtension')
            ->addArgument(new Reference('service_container'))
            ->addTag('twig.extension');

        $container->register('twig.loader', 'Twig_Loader_Filesystem')
            ->addArgument(array('%twig.template_dir%'));

        $container->register('twig', 'Twig_Environment')
            ->addArgument(new Reference('twig.loader'));

        $container->register('templating.engine.twig', 'Nice\Templating\TwigEngine')
            ->addArgument(new Reference('twig'))
            ->addArgument(new Reference('templating.template_name_parser'))
            ->addTag('templating.engine');
    }
1143906
public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();

        $config = $this->processConfiguration($configuration, $configs);

        $container->setParameter(
            static::OVERRIDE_KERNEL_TEMPLATES_PARAM_NAME,
            $config['override_kernel_templates']
        );
    }
755664
public function configureController($config, ContainerBuilder $container)
    {
        $container->setParameter('bruery.oauth_server.admin.access_token.controller',   $config['admin']['access_token']['controller']);
        $container->setParameter('bruery.oauth_server.admin.client.controller',         $config['admin']['client']['controller']);
    }
33967
protected function loadConfig( Container $container, $config ) {
		$container[ WPEMERGE_CONFIG_KEY ] = array_merge(
			$container[ WPEMERGE_CONFIG_KEY ],
			$config
		);
	}
47759
public function load(array $config, ContainerBuilder $container): void
    {
        $config = $this->processConfiguration($this->getConfiguration([], $container), $config);
        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
        $loader->load('services.xml');

        if ($config['assets']['enabled']) {
            $loader->load('services/integrations/assets.xml');
        }

        if ($config['templating']['enabled']) {
            $loader->load('services/integrations/templating.xml');
        }

        if ($config['translations']['enabled']) {
            $loader->load('services/integrations/translations.xml');
        }

        $this->resolveConfigurationSources($container, $config);

        $container->setAlias('sylius.context.theme', $config['context']);
        $container->setAlias(ThemeContextInterface::class, 'sylius.context.theme');
    }
310205
public function load(array $config, ContainerBuilder $container)
    {
        $loader = new YamlFileLoader(
            $container,
            new FileLocator(__DIR__ . '/../Resources/config')
        );

        // Base services override
        $loader->load('services.yml');
    }
952735
public function getConfiguration(array $config, ContainerBuilder $container)
    {
        $configuration = $this->getConfigurationInstance();
        if ($configuration) {
            $container->addObjectResource($configuration);
        }

        return $configuration;
    }
1269616
public function configureProfiler(ContainerBuilder $container, array $config)
    {
        // Setup the data collector service for Symfony profiler
        $dataCollectorDef = new Definition(PheanstalkDataCollector::class);
        $dataCollectorDef->setPublic(false);
        $dataCollectorDef->addTag('data_collector', ['id' => 'pheanstalk', 'template' => $config['profiler']['template']]);
        $dataCollectorDef->addArgument(new Reference('leezy.pheanstalk.pheanstalk_locator'));

        $container->setDefinition('leezy.pheanstalk.data_collector', $dataCollectorDef);
    }
912055
public function configureAsseticBundle(ContainerBuilder $container, array $config)
    {
        foreach (array_keys($container->getExtensions()) as $name) {
            switch ($name) {
                case 'assetic':
                    // Add jQuery in assets
                    $this->addJqueryInAssetic($container, $config['assets']['jquery']);

                    // Add Twitter Bootstrap assets
                    $this->addTwbsInAssetic($container, $config['assets']['twbs']);

                    // Add jQuery UI in assets
                    if (isset($config['assets']['jqueryui'])) {
                        $this->addJqueryUIInAssetic($container, $config['assets']['jqueryui']);
                    }

                    // Add select2 files
                    if (isset($config['assets']['select2'])) {
                        $this->addSelect2InAssetic($container, $config['assets']['select2']);
                    }

                    // Add Basinga js translation in assets
                    if (isset($config['assets']['bazinga_js_translation'])) {
                        $this->addBazingaJsTranslationInAssetic($container, $config['assets']['bazinga_js_translation']);
                    }

                    // Add Speaking URL in assets
                    if (isset($config['assets']['speakingurl'])) {
                        $this->addSpeakingURLInAssetic($container, $config['assets']['speakingurl']);
                    }

                    // Add TinyMCE in assets
                    if (isset($config['assets']['tinymce'])) {
                        $this->addTinyMCEInAssetic($container, $config['assets']['tinymce']);
                    }

                    // Add jQueryTagsInput in assets
                    if (isset($config['assets']['jquery_tags_input'])) {
                        $this->addJqueryTagsInputInAssetic($container, $config['assets']['jquery_tags_input']);
                    }

                    // Add PrismJS in assets
                    if (isset($config['assets']['prism_js'])) {
                        $this->addPrismJSInAssetic($container, $config['assets']['prism_js']);
                    }
                    break;
            }
        }
    }
81858
protected function loadConfiguration(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();
        $config = $this->processConfiguration($configuration, $configs);

        $container->setParameter("hexmedia.seo.options", $config['seo']);

        if (!isset($config['ga']['domain'])) {
            $config['ga']['domain'] = $container->getParameter("domain");
        }

        $container->setParameter("hexmedia.ga.options", $config['ga']);
    }
698582
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new WidgetContentResolverPass());
        //get widgetItems
        $container->addCompilerPass(new WidgetItemPass());
    }
1106072
protected function initializeContainer($config)
    {
        $this->container = $this->buildContainer($config);
        $this->container->compile();
    }
666661
public function load(array $config, ContainerBuilder $container)
    {
        $config = $this->processConfiguration(new Configuration(), $config);

        $provider = $config['provider'];
        $container->setParameter(
            'openclassrooms.cache.default_lifetime',
            $config['default_lifetime']
        );

        $container->setParameter(
            'openclassrooms.cache.cache_provider_type',
            key($provider)
        );

        switch (key($provider)) {
            case CacheProviderType::REDIS:
                $providerConfig = $provider[CacheProviderType::REDIS];
                $container->setParameter('openclassrooms.cache.provider_host', $providerConfig['host']);
                $container->setParameter('openclassrooms.cache.provider_port', $providerConfig['port']);
                $container->setParameter('openclassrooms.cache.provider_timeout', $providerConfig['timeout']);
                break;
            default;
                break;
        }

        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config/'));
        $loader->load('services.xml');
    }
1144481
public function build(ContainerBuilder $container)
    {
        /** @var \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\EzPublishCoreExtension $core */
        $core = $container->getExtension('ezpublish');

        $configParsers = $this->getConfigParsers();
        array_walk($configParsers, [$core, 'addConfigParser']);

        $core->addDefaultSettings(__DIR__ . '/Resources/config', ['ezplatform_default_settings.yml']);

        $this->addCompilerPasses($container);
    }