core-bundle/src/DependencyInjection/ContaoCoreExtension.php
public function load(array $configs, ContainerBuilder $container): void
    {
        $configuration = new Configuration(
            $container->getParameter('kernel.project_dir'),
            $container->getParameter('kernel.default_locale')
        );

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

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

        static $files = [
            'commands.yml',
            'listener.yml',
            'services.yml',
        ];

        foreach ($files as $file) {
            $loader->load($file);
        }

        $container->setParameter('contao.web_dir', $config['web_dir']);
        $container->setParameter('contao.prepend_locale', $config['prepend_locale']);
        $container->setParameter('contao.encryption_key', $config['encryption_key']);
        $container->setParameter('contao.url_suffix', $config['url_suffix']);
        $container->setParameter('contao.upload_path', $config['upload_path']);
        $container->setParameter('contao.csrf_token_name', $config['csrf_token_name']);
        $container->setParameter('contao.pretty_error_screens', $config['pretty_error_screens']);
        $container->setParameter('contao.error_level', $config['error_level']);
        $container->setParameter('contao.locales', $config['locales']);
        $container->setParameter('contao.image.bypass_cache', $config['image']['bypass_cache']);
        $container->setParameter('contao.image.target_dir', $config['image']['target_dir']);
        $container->setParameter('contao.image.valid_extensions', $config['image']['valid_extensions']);
        $container->setParameter('contao.image.imagine_options', $config['image']['imagine_options']);
        $container->setParameter('contao.image.reject_large_uploads', $config['image']['reject_large_uploads']);
        $container->setParameter('contao.security.two_factor.enforce_backend', $config['security']['two_factor']['enforce_backend']);

        if (isset($config['localconfig'])) {
            $container->setParameter('contao.localconfig', $config['localconfig']);
        }

        $this->setImagineService($config, $container);
        $this->overwriteImageTargetDir($config, $container);

        $container
            ->registerForAutoconfiguration(PickerProviderInterface::class)
            ->addTag('contao.picker_provider')
        ;
    }
public function load(array $configs, ContainerBuilder $container): void
    {
        $configuration = new Configuration(
            $container->getParameter('kernel.project_dir'),
            $container->getParameter('kernel.default_locale')
        );

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

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

        static $files = [
            'commands.yml',
            'listener.yml',
            'services.yml',
        ];

        foreach ($files as $file) {
            $loader->load($file);
        }

        $container->setParameter('contao.web_dir', $config['web_dir']);
        $container->setParameter('contao.prepend_locale', $config['prepend_locale']);
        $container->setParameter('contao.encryption_key', $config['encryption_key']);
        $container->setParameter('contao.url_suffix', $config['url_suffix']);
        $container->setParameter('contao.upload_path', $config['upload_path']);
        $container->setParameter('contao.csrf_token_name', $config['csrf_token_name']);
        $container->setParameter('contao.pretty_error_screens', $config['pretty_error_screens']);
        $container->setParameter('contao.error_level', $config['error_level']);
        $container->setParameter('contao.locales', $config['locales']);
        $container->setParameter('contao.image.bypass_cache', $config['image']['bypass_cache']);
        $container->setParameter('contao.image.target_dir', $config['image']['target_dir']);
        $container->setParameter('contao.image.valid_extensions', $config['image']['valid_extensions']);
        $container->setParameter('contao.image.imagine_options', $config['image']['imagine_options']);
        $container->setParameter('contao.image.reject_large_uploads', $config['image']['reject_large_uploads']);
        $container->setParameter('contao.security.two_factor.enforce_backend', $config['security']['two_factor']['enforce_backend']);

        if (isset($config['localconfig'])) {
            $container->setParameter('contao.localconfig', $config['localconfig']);
        }

        $this->setImagineService($config, $container);
        $this->overwriteImageTargetDir($config, $container);

        $container
            ->registerForAutoconfiguration(PickerProviderInterface::class)
            ->addTag('contao.picker_provider')
        ;
    }
public function load ( array $ configs , ContainerBuilder $ container ) : void { $ configuration = new Configuration ( $ container -> getParameter ( 'kernel.project_dir' ) , $ container -> getParameter ( 'kernel.default_locale' ) ) ; $ config = $ this -> processConfiguration ( $ configuration , $ configs ) ; $ loader = new YamlFileLoader ( $ container , new FileLocator ( __DIR__ . '/../Resources/config' ) ) ; static $ files = [ 'commands.yml' , 'listener.yml' , 'services.yml' , ] ; foreach ( $ files as $ file ) { $ loader -> load ( $ file ) ; } $ container -> setParameter ( 'contao.web_dir' , $ config [ 'web_dir' ] ) ; $ container -> setParameter ( 'contao.prepend_locale' , $ config [ 'prepend_locale' ] ) ; $ container -> setParameter ( 'contao.encryption_key' , $ config [ 'encryption_key' ] ) ; $ container -> setParameter ( 'contao.url_suffix' , $ config [ 'url_suffix' ] ) ; $ container -> setParameter ( 'contao.upload_path' , $ config [ 'upload_path' ] ) ; $ container -> setParameter ( 'contao.csrf_token_name' , $ config [ 'csrf_token_name' ] ) ; $ container -> setParameter ( 'contao.pretty_error_screens' , $ config [ 'pretty_error_screens' ] ) ; $ container -> setParameter ( 'contao.error_level' , $ config [ 'error_level' ] ) ; $ container -> setParameter ( 'contao.locales' , $ config [ 'locales' ] ) ; $ container -> setParameter ( 'contao.image.bypass_cache' , $ config [ 'image' ] [ 'bypass_cache' ] ) ; $ container -> setParameter ( 'contao.image.target_dir' , $ config [ 'image' ] [ 'target_dir' ] ) ; $ container -> setParameter ( 'contao.image.valid_extensions' , $ config [ 'image' ] [ 'valid_extensions' ] ) ; $ container -> setParameter ( 'contao.image.imagine_options' , $ config [ 'image' ] [ 'imagine_options' ] ) ; $ container -> setParameter ( 'contao.image.reject_large_uploads' , $ config [ 'image' ] [ 'reject_large_uploads' ] ) ; $ container -> setParameter ( 'contao.security.two_factor.enforce_backend' , $ config [ 'security' ] [ 'two_factor' ] [ 'enforce_backend' ] ) ; if ( isset ( $ config [ 'localconfig' ] ) ) { $ container -> setParameter ( 'contao.localconfig' , $ config [ 'localconfig' ] ) ; } $ this -> setImagineService ( $ config , $ container ) ; $ this -> overwriteImageTargetDir ( $ config , $ container ) ; $ container -> registerForAutoconfiguration ( PickerProviderInterface :: class ) -> addTag ( 'contao.picker_provider' ) ; }
{@inheritdoc}
{