/** * Load attribute options * * @return $this */ public function loadAttributeOptions() { $productAttributes = $this->_productResource->loadAllAttributes()->getAttributesByCode(); $attributes = []; foreach ($productAttributes as $attribute) { /* @var $attribute \Magento\Catalog\Model\ResourceModel\Eav\Attribute */ if (!$attribute->isAllowedForRuleCondition() || !$attribute->getDataUsingMethod($this->_isUsedForRuleProperty)) { continue; } $attributes[$attribute->getAttributeCode()] = $attribute->getFrontendLabel(); } $this->_addSpecialAttributes($attributes); asort($attributes); $this->setAttributeOption($attributes); return $this; }
/** * {@inheritdoc} */ public function loadAllAttributes($object = null) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'loadAllAttributes'); if (!$pluginInfo) { return parent::loadAllAttributes($object); } else { return $this->___callPlugins('loadAllAttributes', func_get_args(), $pluginInfo); } }