Run all blocks from import csv as they may not have be found and rendered in the theme files
@param ThemeBuilderInstance $themeBuilder
194031
protected function _renderCsvBlocks($themeBuilder)
    {
        $themeBuilder->setData('template', '');
        foreach ($this->_blocksCollection->getBlocks('csv') as $blockName => $importBlock) {
            $themeBuilder->block($blockName);
        }
    }
479516
protected function _renderThemeFiles($scope = 'file')
    {
        $this->_blocksCollection->setScope($scope);

        $themeBuilder = PageBuilder::make(ThemeBuilderInstance::class, [new PageLoaderDummy($this->_additionalData['theme']->theme), $this->_blocksCollection]);
        if ($this->_templateList) {
            foreach ($this->_templateList as $templateName) {
                $templateView = 'themes.' . $this->_additionalData['theme']->theme . '.templates.' . $templateName;
                if (View::exists($templateView)) {
                    $themeBuilder->setData('template', $templateName);
                    $themeBuilder->setRenderPath([['template' => $templateName]]);
                    try {
                        View::make($templateView)->render();
                    } catch (\Exception $e) {
                        $this->_importErrors[] = $e;
                    }
                }
            }
            $this->_renderedOrders = $themeBuilder->getOrders();
        }

        // make sure every csv block is rendered & better after theme render as there is less context
        $this->_renderCsvBlocks($themeBuilder);
    }
48808
public function process(ContainerBuilder $container): void
    {
        if ($container->has('ezpublish.fieldType.ezxmltext.converter.embedToHtml5')) {
            $container
                ->findDefinition('ezpublish.fieldType.ezxmltext.converter.embedToHtml5')
                ->setClass(EmbedToHtml5::class)
                ->addMethodCall('setSite', [new Reference('netgen.ezplatform_site.site')]);
        }
    }
761548
public function onMainMenuBuild(MenuBuilderEvent $event): void
    {
        if (!$this->authorizationChecker->isGranted('ROLE_NGBM_ADMIN')) {
            return;
        }

        $this->addLayoutsSubMenu($event->getMenu());
    }
949884
private function setStandardThemeDirectories(ContainerBuilder $container)
    {
        if (!$container->hasParameter('kernel.bundles_metadata')) {
            return;
        }

        $bundlesMetaData = $container->getParameter('kernel.bundles_metadata');
        if (!isset($bundlesMetaData['EzPublishCoreBundle']['path'])) {
            return;
        }

        $templatesPathMap = $container->hasParameter('ezdesign.templates_path_map')
            ? $container->getParameter('ezdesign.templates_path_map')
            : [];

        $templatesPathMap['standard'][] = $bundlesMetaData['EzPublishCoreBundle']['path'] . '/Resources/views';

        $container->setParameter('ezdesign.templates_path_map', $templatesPathMap);
    }
1024838
public function autoWireServices(ContainerBuilder $containerBuilder): void
    {
        $services = $this->getServices();
        foreach ($services as $class) {
            $containerBuilder->autowire($class, $class)->setPublic(true);
        }
    }
698582
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new WidgetContentResolverPass());
        //get widgetItems
        $container->addCompilerPass(new WidgetItemPass());
    }
350821
public function build(ContainerBuilder $container)
    {
        parent::build($container);
        $container->addCompilerPass(new TransportCompilerPass());
        $container->addCompilerPass(new SpoolCompilerPass());
    }
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);
        }
    }
429615
public function addRowRenderer(RowRendererInterface $renderer): void
    {
        // Test if all required columns are present in column model
        $required_columns = $renderer->getRequiredColumns();

        foreach ($required_columns as $column) {
            if (!$this->exists($column)) {
                $cls = get_class($renderer);
                $msg = "Renderer '$cls' requires column '$column' to be present in column model.";
                throw new Exception\MissingColumnException(__METHOD__ . ': ' . $msg);
            }
        }

        $this->row_renderers->append($renderer);
    }
354110
public function process(ContainerBuilder $container)
    {
        $templatesPathMap = $container->hasParameter('ezdesign.templates_path_map')
            ? $container->getParameter('ezdesign.templates_path_map')
            : [];

        $templatesPathMap['admin'][] = realpath(__DIR__ . '/../../Resources/views');

        $container->setParameter('ezdesign.templates_path_map', $templatesPathMap);
    }
1029440
private function renderBlock(array $blockNames, $cacheKey, array $context)
    {
        $template = $blockName = null;

        $themes = $this->defaultThemes;
        if (isset($this->themes[$cacheKey])) {
            $themes = array_merge($this->themes[$cacheKey], $this->defaultThemes);
        }

        // Search the template for first block available
        foreach ($blockNames as $name) {
            if ($template = $this->getTemplateForBlock($name, $themes)) {
                $blockName = $name;
                break;
            }
        }

        // Throw if no matching blocks are found
        if (empty($template)) {
            throw new \RuntimeException(sprintf(
                "Block%s %s not found in table themes (%s)",
                count($blockNames) > 1 ? 's' : '', implode(', ', $blockNames), implode(', ', $this->defaultThemes)
            ));
        }

        return $template->renderBlock($blockName, $context);
    }
1077553
@Override
    public void build() {
        if (site != null) {
            site.getProcessors().beforeBuildTheme(this);
        }

        initializeResourceBuilders();
        if (!builders.isEmpty()) {
            try {
                for (ResourceBuilder builder : builders) {
                    builder.build();
                }
            } catch (RuntimeException e) {
                throw e;
            } catch (Exception e) {
                throw new RuntimeException("Theme build exception", e);
            }
        }

        if (site != null) {
            site.getProcessors().afterBuildTheme(this);
        }
    }
567676
public function run()
    {
        $data = $this->getData();

        foreach ($data as $feature => $value)
        {
            // Allow theme features without options.
            if (is_int($feature))
            {
                add_theme_support($value);
            }
            else
            {
                // Theme features with options.
                add_theme_support($feature, $value);
            }
        }
    }
23024
public function prepend(ContainerBuilder $container)
    {
        $this->prependViews($container);
        $this->prependImageVariations($container);
        $this->prependUniversalDiscoveryWidget($container);
        $this->prependEzDesignConfiguration($container);
        $this->prependAdminUiFormsConfiguration($container);
        $this->prependBazingaJsTranslationConfiguration($container);
    }
847167
public function process(ContainerBuilder $container)
    {
        $checkers = array();
        foreach ($container->findTaggedServiceIds('avoo.resource_generator.template') as $id => $attributes) {
            $checkers[$attributes[0]['type']] = $id;
        }

        $container->setParameter('avoo.resource_generator.templates', $checkers);
    }
777066
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition($this->subjectService)) {
            return;
        }

        $subjects = $this->findTaggedServices($container, $this->subjectTag, SubjectInterface::class, 'support', false);

        $subjectDefinition = $container->getDefinition($this->subjectService);
        $subjectDefinition->replaceArgument(0, $subjects);
    }