scopeConfig = $scopeConfig; $this->themeProvider = $themeProvider; $this->storeManager = $storeManager; } /** * @return string */ public function getVendor(): string { return mb_strstr(mb_strtolower($this->getCode()), '/', true); } /** * @return string */ public function getName(): string { return str_replace('/', '-', mb_strtolower($this->getCode())); } /** * @return string */ public function getCode(): string { $themeId = $this->scopeConfig->getValue( DesignInterface::XML_PATH_THEME_ID, ScopeInterface::SCOPE_STORE, $this->storeManager->getStore()->getId() ); $themeData = $this->themeProvider->getThemeById($themeId)->getData(); return $themeData['code'] ?? self::THEME_CODE_DEFAULT; } }