Loads the piwik configuration.

@param array $config  An array of configuration settings
@param \Symfony\Component\DependencyInjection\ContainerBuilder $container A ContainerBuilder instance
1095
public function load(array $configs, ContainerBuilder $container)
    {
        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));

        if (!$container->hasDefinition('piwik.client')) {
            $loader->load('piwik.xml');
        }

        $config = $this->mergeConfigs($configs);

        if (isset($config['connection'])) {
            $definition     = $container->getDefinition('piwik.client');
            $arguments      = $definition->getArguments();
            $arguments[0]   = new Reference($config['connection']);
            $definition->setArguments($arguments);
        }

        if (isset($config['url'])) {
            $container->setParameter('piwik.connection.http.url', $config['url']);
        }

        if (isset($config['init'])) {
            $container->setParameter('piwik.connection.piwik.init', (bool) $config['init']);
        }

        if (isset($config['token'])) {
            $container->setParameter('piwik.client.token', $config['token']);
        }
    }
39802
public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration($this->getAlias());
        $config = $this->processConfiguration($configuration, $configs);

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

        $container->setParameter('gendoria_command_queue.pools', $config['pools']);
        if (!$config['enabled']) {
            $managerDefinition = $container->getDefinition('gendoria_command_queue.manager');
            $managerDefinition->setClass(NullQueueManager::class);
        }
        $this->setupManagers($config, $container);
        if (!$config['listeners']['clear_entity_managers']) {
            $container->removeDefinition('gendoria_command_queue.listener.clear_entity_managers');
        }        
        if (!$config['listeners']['clear_logs']) {
            $container->removeDefinition('gendoria_command_queue.listener.clear_logs');
        }        
    }
96356
public function configureCdnAdapter(ContainerBuilder $container, array $config)
    {
        // add the default configuration for the server cdn
        if ($container->hasDefinition('sonata.media.cdn.server') && isset($config['cdn']['server'])) {
            $container->getDefinition('sonata.media.cdn.server')
                ->replaceArgument(0, $config['cdn']['server']['path'])
            ;
        } else {
            $container->removeDefinition('sonata.media.cdn.server');
        }

        if ($container->hasDefinition('sonata.media.cdn.panther') && isset($config['cdn']['panther'])) {
            $container->getDefinition('sonata.media.cdn.panther')
                ->replaceArgument(0, $config['cdn']['panther']['path'])
                ->replaceArgument(1, $config['cdn']['panther']['username'])
                ->replaceArgument(2, $config['cdn']['panther']['password'])
                ->replaceArgument(3, $config['cdn']['panther']['site_id'])
            ;
        } else {
            $container->removeDefinition('sonata.media.cdn.panther');
        }

        if ($container->hasDefinition('sonata.media.cdn.cloudfront') && isset($config['cdn']['cloudfront'])) {
            $container->getDefinition('sonata.media.cdn.cloudfront')
                ->replaceArgument(0, $config['cdn']['cloudfront']['path'])
                ->replaceArgument(1, $config['cdn']['cloudfront']['key'])
                ->replaceArgument(2, $config['cdn']['cloudfront']['secret'])
                ->replaceArgument(3, $config['cdn']['cloudfront']['distribution_id'])
            ;
        } else {
            $container->removeDefinition('sonata.media.cdn.cloudfront');
        }

        if ($container->hasDefinition('sonata.media.cdn.fallback') && isset($config['cdn']['fallback'])) {
            $container->getDefinition('sonata.media.cdn.fallback')
                ->replaceArgument(0, new Reference($config['cdn']['fallback']['master']))
                ->replaceArgument(1, new Reference($config['cdn']['fallback']['fallback']))
            ;
        } else {
            $container->removeDefinition('sonata.media.cdn.fallback');
        }
    }
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']
        );
    }
692233
public function load(ContainerBuilder $container, array $config)
    {
        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/config'));
        $loader->load('services.xml');

        if (!empty($config['path'])) {
            if (isset($config['path']['resources'])) {
                $container->setParameter('paths.resources.resource', $config['path']['resources']);
            }

            if (isset($config['path']['base'])) {
                $container->setParameter('paths.resources.base', $config['path']['base']);
            }
        }

        if (!empty($config['resource_map'])) {
            $container->setParameter('resource.map', $config['resource_map']);
        }
    }
1125939
protected function loadInternal(array $mergedConfig, ContainerBuilder $container)
    {
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config/services'));
        $loader->load('services.yml');
        $container->setParameter('tactician.merged_config', $mergedConfig);
        $this->configureSecurity($mergedConfig, $container);
        $this->configureLogger($mergedConfig, $container);
    }
550234
protected function loadConfiguration(ContainerBuilder $container, array $config)
    {
        $container->setParameter('jb_fileuploader.endpoints', $config);
        $container->setParameter('jb_fileuploader.crop_route', $config['crop_route']);
    }
210209
private function configurePlugins(ContainerBuilder $container, array $config)
    {
        if (!empty($config['authentication'])) {
            $this->configureAuthentication($container, $config['authentication']);
        }
        unset($config['authentication']);

        foreach ($config as $name => $pluginConfig) {
            $pluginId = 'httplug.plugin.'.$name;

            if ($this->isConfigEnabled($container, $pluginConfig)) {
                $def = $container->getDefinition($pluginId);
                $this->configurePluginByName($name, $def, $pluginConfig, $container, $pluginId);
            }
        }
    }
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']);
    }
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');
    }
887841
public function load(ContainerBuilder $container, array $config)
    {
        $definition = new Definition('emuse\\BehatHTMLFormatter\\Formatter\\BehatHTMLFormatter');
        $definition->addArgument($config['name']);
        $definition->addArgument($config['renderer']);
        $definition->addArgument($config['file_name']);
        $definition->addArgument($config['print_args']);
        $definition->addArgument($config['print_outp']);
        $definition->addArgument($config['loop_break']);

        $definition->addArgument('%paths.base%');
        $container->setDefinition('html.formatter', $definition)
      ->addTag('output.formatter');
    }
900134
public function load(ContainerBuilder $container, array $config): void
    {
        $this->crossContainerProcessor->addContainerAccessor('behat', new ContainerBasedContainerAccessor($container));
    }
79374
public function load(array $configs, ContainerBuilder $container)
    {
        $processor = new Processor();
        $configuration = new Configuration();

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

        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));

        $container->setParameter('twig.form.resources', array_merge(
            $container->getParameter('twig.form.resources'),
            ['VictoireMediaBundle:Form:formWidgets.html.twig']
        ));

        $loader->load('services.yml');
        $loader->load('handlers.yml');
    }
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]);
        }
    }
1105287
protected function postLoad(array $config, ContainerBuilder $container)
    {
        parent::postLoad($config, $container);

        if (!empty($config['renderers'])) {
            $rendererReferences = [];
            foreach ($config['renderers'] as $rendererId) {
                $rendererReferences[] = new Reference($rendererId);
            }

            $controllerId = 'elcodi.page_renderer_chain';
            $controllerDefinition = $container->findDefinition($controllerId);
            $controllerDefinition->addArgument($rendererReferences);
        }
    }
952735
public function getConfiguration(array $config, ContainerBuilder $container)
    {
        $configuration = $this->getConfigurationInstance();
        if ($configuration) {
            $container->addObjectResource($configuration);
        }

        return $configuration;
    }
1012961
public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new FlowConfiguration();
        $processor = new Processor();
        $this->flowsConfig = $processor->processConfiguration($configuration, $configs);
    }