private function saveAttributeSet() { if ($this->attributeSetObj->getId()) { return array('result' => true, 'obj' => $this->attributeSetObj); } $this->attributeSetObj->setEntityTypeId($this->entityTypeId)->setAttributeSetName($this->setName); try { $this->attributeSetObj->validate(); $this->attributeSetObj->save(); $this->attributeSetObj->initFromSkeleton($this->skeletonId)->save(); } catch (\Exception $e) { return array('result' => false, 'error' => $e->getMessage()); } return array('result' => true, 'obj' => $this->attributeSetObj); }
/** * {@inheritdoc} */ public function save() { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'save'); if (!$pluginInfo) { return parent::save(); } else { return $this->___callPlugins('save', func_get_args(), $pluginInfo); } }