private function saveGroup() { if ($this->groupObj->getId()) { return array('result' => true); } if (!$this->attributeSetObj) { return array('result' => false, 'error' => "Attribute Set '{$this->attributeSetId}' is not found."); } $this->groupObj->setAttributeGroupName($this->name); $this->groupObj->setAttributeSetId($this->attributeSetId); try { $this->groupObj->save(); } catch (\Exception $e) { return array('result' => false, 'error' => $e->getMessage()); } return array('result' => true, 'obj' => $this->groupObj); }