init
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
namespace Esun\MegaMenu\Model\Config\Source;
|
||||
|
||||
use Magento\Eav\Model\Entity\Attribute\Source\AbstractSource;
|
||||
|
||||
class MegaMenuType extends AbstractSource
|
||||
{
|
||||
public const PRODUCT = 'product';
|
||||
public const ICON_CATEGORY = 'icon_category';
|
||||
|
||||
public function toOptionArray(): array
|
||||
{
|
||||
return [
|
||||
['value' => self::PRODUCT, 'label' => __('Product Mega Menu')],
|
||||
['value' => self::ICON_CATEGORY, 'label' => __('Icon Category Mega Menu')]
|
||||
];
|
||||
}
|
||||
|
||||
public function getAllOptions(): array
|
||||
{
|
||||
if ($this->_options === null) {
|
||||
$this->_options = $this->toOptionArray();
|
||||
}
|
||||
|
||||
return $this->_options;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user