diff --git a/Plugin/UseMagentoBackendThemeOnDebugFrontendViewPlugin.php b/Plugin/UseMagentoBackendThemeOnDebugFrontendViewPlugin.php index 4a1541c..d56e9c9 100644 --- a/Plugin/UseMagentoBackendThemeOnDebugFrontendViewPlugin.php +++ b/Plugin/UseMagentoBackendThemeOnDebugFrontendViewPlugin.php @@ -1,12 +1,16 @@ currentTheme = $this->design->getDesignTheme()->getThemePath(); $this->design->setArea(Area::AREA_ADMINHTML); $this->design->setDesignTheme('Magento/backend'); } + + public function afterExecute(HttpGetActionInterface $subject, ?ResultInterface $result): ?ResultInterface + { + $this->design->setArea(Area::AREA_FRONTEND); + $this->design->setDesignTheme($this->currentTheme); + + return $result; + } } diff --git a/composer.json b/composer.json index 049e6df..bf2452e 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "filp/whoops": "^2.1", "jdorn/sql-formatter": "^1.2", "symfony/var-dumper": "*", - "symfony/stopwatch": "^2.8 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" + "symfony/stopwatch": "^2.8 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0" }, "require-dev": { "bitexpert/phpstan-magento": "^0.30.0",