*/ class Mage_Api_Model_Resource_Acl_Role extends Mage_Core_Model_Resource_Db_Abstract { /** * Resource initialization * */ protected function _construct() { $this->_init('api/role', 'role_id'); } /** * Action before save * * @param Mage_Core_Model_Abstract $object * @return Mage_Api_Model_Resource_Acl_Role */ protected function _beforeSave(Mage_Core_Model_Abstract $object) { if (!$object->getId()) { $this->setCreated(Mage::getSingleton('core/date')->gmtDate()); } return $this; } }