/** * {@inheritdoc} */ public function addSetInfo($entityType, array $attributes, $setId = null) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'addSetInfo'); if (!$pluginInfo) { return parent::addSetInfo($entityType, $attributes, $setId); } else { return $this->___callPlugins('addSetInfo', func_get_args(), $pluginInfo); } }
/** * Retrieve sorted attributes * * @param int $setId * @return array */ public function getSortedAttributes($setId = null) { $attributes = $this->getAttributesByCode(); if ($setId === null) { $setId = $this->getEntityType()->getDefaultAttributeSetId(); } // initialize set info $this->_attrSetEntity->addSetInfo($this->getEntityType(), $attributes, $setId); foreach ($attributes as $code => $attribute) { /* @var $attribute AbstractAttribute */ if (!$attribute->isInSet($setId)) { unset($attributes[$code]); } } $this->_sortingSetId = $setId; uasort($attributes, array($this, 'attributesCompare')); return $attributes; }