prepareTwig

@param Container $container

@return  void
492765
protected function prepareTwig(Container $container)
    {
        // Twig
        if (class_exists('Twig_Extension')) {
            Renderer\Twig\GlobalContainer::addExtension('windwalker', new WindwalkerExtension($container));
        }
    }
4014
public function process(ContainerBuilder $container)
    {
        if ($container->hasDefinition('twig')) {
            $twig = $container->getDefinition('twig');
            $twig->addMethodCall('addGlobal', array('context', new Reference('open_orchestra_backoffice.context_backoffice_manager')));

            $formResources = $container->getParameter('twig.form.resources');
            $formResources[] = 'OpenOrchestraBackofficeBundle:Form:form_div_layout.html.twig';
            $container->setParameter('twig.form.resources', $formResources);
        }
    }
248524
public function process(ContainerBuilder $container)
    {
        if ($container->hasDefinition('twig')) {
            $twig = $container->getDefinition('twig');
            if ($container->hasParameter('open_orchestra_user.base_layout')) {
                $twig->addMethodCall('addGlobal', array('base_layout', new Parameter('open_orchestra_user.base_layout')));
            }
        }
    }
692922
public function permissionForm(Container $container): void
	{
		/* @var $container IContainer */
		$container->addSelectUntranslated('role', 'cms.permissions.role')
			->setItems($this->orm->aclRoles->fetchPairs($this->viewSuperadmin));
		$container->addMultiSelectUntranslated('resource', 'cms.permissions.resource')
			->setItems($this->orm->aclResources->fetchPairsByResourceName());
		$container->addSelect('privilege', 'cms.permissions.privilege', $this->privileges);
		$container->addSelect('allowed', 'default.state', $this->access);
	}
23024
public function prepend(ContainerBuilder $container)
    {
        $this->prependViews($container);
        $this->prependImageVariations($container);
        $this->prependUniversalDiscoveryWidget($container);
        $this->prependEzDesignConfiguration($container);
        $this->prependAdminUiFormsConfiguration($container);
        $this->prependBazingaJsTranslationConfiguration($container);
    }
1127952
private function injectFormThemeConfiguration(ContainerBuilder $container)
    {
        if (($twigConfiguration = $container->getParameter('admingenerator.twig')) !== false) {
            $resources = $container->getParameter('twig.form.resources');
            $alreadyIn = in_array('bootstrap_3_layout.html.twig', $resources);

            if ($twigConfiguration['use_form_resources'] && !$alreadyIn) {
                $key = array_search('form_div_layout.html.twig', $resources) ? array_search('form_div_layout.html.twig', $resources) : 0;
                // Insert right after form_div_layout.html.twig if exists
                array_splice($resources, ++$key, 0, array('bootstrap_3_layout.html.twig'));

                $container->setParameter('twig.form.resources', $resources);
            }
        }
    }
767923
protected function configureKnpPaginatorBundle(ContainerBuilder $container)
    {
        foreach (array_keys($container->getExtensions()) as $name) {
            switch ($name) {
                case 'knp_paginator':
                    $container->prependExtensionConfig(
                        $name,
                        array('template' => array('pagination' => $this->paginationTemplate))
                    );
                    break;
            }
        }
    }
178804
public function prepend(ContainerBuilder $container)
    {
        $bundles = $container->getParameter('kernel.bundles');

        if (true === isset($bundles['FOSUserBundle'])) {
            $this->configureFOSUserBundle($container);
        }
    }
340604
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new VersionCompilerPass(new PrettyVersions()));
        $container->addCompilerPass(new EnvParametersCompilerPass());
        $container->addCompilerPass(new RouteLoaderCompilerPass());
        $container->addCompilerPass(new HttpClientOptionsCompilerPass());
    }
653685
public function prepend(ContainerBuilder $container)
    {
        $configs = $container->getExtensionConfig($this->getAlias());
        $config = $this->processConfiguration(new Configuration(), $configs);

        $bundles = $container->getParameter('kernel.bundles');

        // Publish assetic assets if desired
        if ($config['assets']['publish'] && isset($bundles['AsseticBundle'])) {
            $container->prependExtensionConfig('assetic', array('assets' => $this->getAssets($config)));
        }
    }
563114
protected function setupContainer(Container $container=null)
    {
        $this->container = $container ?? $this->container ?? new Container;

        $prefix= $this->getAbstractPrefix();

        if (! $this->container->bound( $prefix.'config')) {
            $this->container->instance( $prefix .'config', new Repository);
        }

        $this->config=$this->container->make( $prefix . 'config');
    }
1359988
protected function setDependencies(Container $container)
    {
        parent::setDependencies($container);

        $this->setDebug($container['debug']);
        $this->setTranslator($container['translator']);
        $this->setAppConfig($container['config']);
        $this->setBaseUrl($container['base-url']);

        $metatags = $this->appConfig('cms.metatags');
        if (is_array($metatags)) {
            $this->setSeoMetadata($metatags);
        }
    }
777277
public function roleForm(Container $container): void
	{
		$roles = ['' => $this->translate('form.none')] + $this->orm->aclRoles->fetchPairs($this->viewSuperadmin);
		$container->addText('title', 'cms.permissions.role')
			->setRequired();
		$container->addText('name', 'cms.permissions.name')
			->setRequired();
		$container->addSelect('parent', $this->translate('cms.permissions.parent'))
			->setTranslator()
			->setItems($roles);
	}
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)));
            }
        }
    }
1008400
public function process(ContainerBuilder $container): void
    {
        $scopes = array_merge(
            [ConfigResolver::SCOPE_DEFAULT],
            $container->getParameter('ezpublish.siteaccess.list')
        );

        // Adding ezxml_tags.xsl to all scopes
        foreach ($scopes as $scope) {
            if (!$container->hasParameter("ezsettings.${scope}.fieldtypes.ezxml.custom_xsl")) {
                continue;
            }

            $xslConfig = $container->getParameter("ezsettings.${scope}.fieldtypes.ezxml.custom_xsl");
            $xslConfig[] = ['path' => __DIR__ . '/../../Resources/xsl/ezxml_tags.xsl', 'priority' => 5000];
            $container->setParameter("ezsettings.${scope}.fieldtypes.ezxml.custom_xsl", $xslConfig);
        }
    }
1310045
public function prepend(ContainerBuilder $container)
    {
        $container->prependExtensionConfig('assetic', array('bundles' => array('SmileEzUICronBundle')));

        $this->prependYui($container);
        $this->prependCss($container);
    }
564014
public function build(ContainerBuilder $container)
    {
        parent::build($container);

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