Public Member Functions | |
itemExists ($object) | |
Protected Member Functions | |
_construct () | |
_beforeSave (Mage_Core_Model_Abstract $object) | |
_afterSave (Mage_Core_Model_Abstract $object) |
Definition at line 28 of file Group.php.
_afterSave | ( | Mage_Core_Model_Abstract $ | object | ) | [protected] |
Perform actions after object save
Mage_Core_Model_Abstract | $object |
Reimplemented from Mage_Core_Model_Mysql4_Abstract.
Definition at line 65 of file Group.php.
00066 { 00067 if ($object->getAttributes()) { 00068 foreach ($object->getAttributes() as $attribute) { 00069 $attribute->setAttributeGroupId($object->getId()); 00070 $attribute->save(); 00071 } 00072 } 00073 return parent::_afterSave($object); 00074 }
_beforeSave | ( | Mage_Core_Model_Abstract $ | object | ) | [protected] |
Perform actions before object save
Mage_Core_Model_Abstract | $object |
Reimplemented from Mage_Core_Model_Mysql4_Abstract.
Definition at line 52 of file Group.php.
00053 { 00054 if (!$object->getSortOrder()) { 00055 $object->setSortOrder($this->_getMaxSortOrder($object) + 1); 00056 } 00057 return parent::_beforeSave($object); 00058 }
_construct | ( | ) | [protected] |
Resource initialization
Reimplemented from Mage_Core_Model_Resource_Abstract.
Definition at line 30 of file Group.php.
00031 { 00032 $this->_init('eav/attribute_group', 'attribute_group_id'); 00033 }
itemExists | ( | $ | object | ) |
Definition at line 35 of file Group.php.
00036 { 00037 $read = $this->_getReadAdapter(); 00038 $select = $read->select()->from($this->getMainTable()) 00039 ->where("attribute_group_name='{$object->getAttributeGroupName()}'"); 00040 $data = $read->fetchRow($select); 00041 if (!$data) { 00042 return false; 00043 } 00044 return true; 00045 }