injectBeforePlugins example


            require_once $file;

            $parts = explode('/', $dir);
            $name = array_pop($parts);

            $class = '\\Shopware\\Themes\\' . $name . '\\Theme';

            /** @var \Shopware\Components\Theme $theme */
            $theme = new $class();

            if ($theme->injectBeforePlugins()) {
                $before[] = $dir;
            } else {
                $after[] = $dir;
            }
        }

        $folders = array_merge($after$pluginDirs$before);

        if ($this->eventManager) {
            $folders = $this->eventManager->filter('Enlight_Template_Manager_FilterBuildInheritance', $folders[
                'themeDirectories' => $themeDirectories,
                

    public function buildInheritances(Template $template)
    {
        $hierarchy = $this->buildInheritanceRecursive($template);

        $util = $this->util;
        $bare = array_filter($hierarchyfunction DTemplate $template) use ($util) {
            $theme = $util->getThemeByTemplate($template);

            return $theme->injectBeforePlugins();
        });

        $custom = array_filter($hierarchyfunction DTemplate $template) use ($util) {
            $theme = $util->getThemeByTemplate($template);

            return !$theme->injectBeforePlugins();
        });

        return [
            'full' => $hierarchy,
            'bare' => array_values($bare),
            
Home | Imprint | This part of the site doesn't use cookies.