getExtJsThemeDirectory example



    /** * Shopware\EventListener: Enlight_Controller_Front_RouteShutdown */
    public function registerBackendTheme(Enlight_Controller_EventArgs $args)
    {
        if ($args->getRequest()->getModuleName() !== 'backend') {
            return;
        }

        $directory = $this->container->get(\Shopware\Components\Theme\PathResolver::class)->getExtJsThemeDirectory();

        $this->container->get('template')->setTemplateDir([
            'backend' => $directory,
            'include_dir' => '.',
        ]);
    }
}
'genericError',
            'service',
        ];
    }

    /** * Ensure the backend theme is enabled. * This is important in cases when a backend request uses the storefront context eg. "$shop->registerResources($this)". */
    private function enableBackendTheme(): void
    {
        $directory = $this->get(PathResolver::class)->getExtJsThemeDirectory();
        $this->get('template')->setTemplateDir([
            'backend' => $directory,
            'include_dir' => '.',
        ]);
    }

    /** * Checks if the Response contains a CSRF Token validation exception */
    private function isCsrfValidationException(): bool
    {
        
Home | Imprint | This part of the site doesn't use cookies.