![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/cartforge.co/app/code/Smartwave/Megamenu/Model/Attribute/ |
<?php namespace Smartwave\Megamenu\Model\Attribute; class Categorylabel extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource { protected $_helper; public function __construct( \Smartwave\Megamenu\Helper\Data $helper ) { $this->_helper = $helper; } public function getAllOptions() { $label1 = $this->_helper->getConfig('sw_megamenu/cat_labels/label1'); $label2 = $this->_helper->getConfig('sw_megamenu/cat_labels/label2'); $label3 = $this->_helper->getConfig('sw_megamenu/cat_labels/label3'); if (!$this->_options) { $this->_options = [ ['value' => '', 'label' => __('No Label')], ['value' => 'label1', 'label' => $label1], ['value' => 'label2', 'label' => $label2], ['value' => 'label3', 'label' => $label3] ]; } return $this->_options; } }