Skip to content

Commit f5f6f62

Browse files
committed
Skip non-frontend themes in config option
1 parent e0df380 commit f5f6f62

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Config/Source/ThemePathOptions.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Loki\Theme\Config\Source;
44

5+
use Magento\Framework\App\Area;
56
use Magento\Framework\Data\OptionSourceInterface;
67
use Magento\Framework\View\Design\Theme\ThemeList;
78
use Magento\Framework\View\Design\ThemeInterface;
@@ -18,6 +19,10 @@ public function toOptionArray()
1819
$options = [];
1920
foreach ($this->themeList->getItems() as $theme) {
2021
/** @var ThemeInterface $theme */
22+
if ($theme->getArea() !== Area::AREA_FRONTEND) {
23+
continue;
24+
}
25+
2126
$options[] = [
2227
'value' => $theme->getThemePath(),
2328
'label' => $theme->getThemePath(),

0 commit comments

Comments
 (0)