12 use Psr\Log\LoggerInterface;
83 if ($this->appState->getMode() != AppState::MODE_PRODUCTION) {
84 $this->themeRegistration->register();
85 $this->updateThemeData();
88 $this->logger->critical($e);
97 protected function updateThemeData()
99 $themesFromConfig = $this->themeCollection->loadData();
101 foreach ($themesFromConfig as $themeFromConfig) {
103 $themeFromDb = $this->themeLoader->getThemeByFullPath(
104 $themeFromConfig->getArea()
105 . Theme::THEME_PATH_SEPARATOR
106 . $themeFromConfig->getThemePath()
109 if ($themeFromConfig->getParentTheme()) {
110 $parentThemeFromDb = $this->themeLoader->getThemeByFullPath(
111 $themeFromConfig->getParentTheme()->getFullPath()
113 $themeFromDb->setParentId($parentThemeFromDb->getId());
116 $themeFromDb->setThemeTitle($themeFromConfig->getThemeTitle());
117 $themeFromDb->save();
__construct(ThemeRegistration $themeRegistration, ThemeCollection $themeCollection, ThemeLoader $themeLoader, LoggerInterface $logger, AppState $appState)
beforeDispatch(AbstractAction $subject, RequestInterface $request)