/** * Check if is option for delete * * @param Attribute $attribute * @param integer $optionId * @return bool */ protected function isOptionForDelete(Attribute $attribute, $optionId) { $isOptionForDelete = $attribute->getData('option/delete/' . $optionId); return isset($isOptionForDelete) && $isOptionForDelete; }
/** * {@inheritdoc} */ public function getData($key = '', $index = null) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getData'); if (!$pluginInfo) { return parent::getData($key, $index); } else { return $this->___callPlugins('getData', func_get_args(), $pluginInfo); } }
/** * @param Attribute $attribute * @return $this */ public function populateAdditionalDataEavAttribute(Attribute $attribute) { $additionalData = unserialize($attribute->getData('additional_data')); if (isset($additionalData) && is_array($additionalData)) { foreach ($this->eavAttributeAdditionalDataKeys as $key) { if (isset($additionalData[$key])) { $attribute->setData($key, $additionalData[$key]); } } } return $this; }