Public Member Functions | |
load (Mage_Core_Model_Abstract $object, $value, $field=null) | |
Protected Member Functions | |
_construct () | |
_beforeSave (Mage_Core_Model_Abstract $object) |
Definition at line 27 of file Role.php.
_beforeSave | ( | Mage_Core_Model_Abstract $ | object | ) | [protected] |
Mage_Core_Model_Abstract | $object |
Reimplemented from Mage_Core_Model_Mysql4_Abstract.
Definition at line 39 of file Role.php.
00040 { 00041 if ( !$object->getId() ) { 00042 $object->setCreated(now()); 00043 } 00044 $object->setModified(now()); 00045 return $this; 00046 }
_construct | ( | ) | [protected] |
Resource initialization
Reimplemented from Mage_Core_Model_Resource_Abstract.
Definition at line 29 of file Role.php.
00030 { 00031 $this->_init('admin/role', 'role_id'); 00032 }
load | ( | Mage_Core_Model_Abstract $ | object, | |
$ | value, | |||
$ | field = null | |||
) |
Load an object
Mage_Core_Model_Abstract | $object | |
mixed | $value | |
string | $field field to load by (defaults to model id) |
Reimplemented from Mage_Core_Model_Mysql4_Abstract.
Definition at line 48 of file Role.php.
00049 { 00050 if (!intval($value) && is_string($value)) { 00051 $field = 'role_id'; 00052 } 00053 return parent::load($object, $value, $field); 00054 }