本文整理汇总了PHP中Mage_Core_Model_Abstract::setCreated方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Abstract::setCreated方法的具体用法?PHP Mage_Core_Model_Abstract::setCreated怎么用?PHP Mage_Core_Model_Abstract::setCreated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Abstract
的用法示例。
在下文中一共展示了Mage_Core_Model_Abstract::setCreated方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _beforeSave
/**
* Process role before saving
*
* @param Mage_Core_Model_Abstract $object
* @return Mage_Admin_Model_Resource_Role
*/
protected function _beforeSave(Mage_Core_Model_Abstract $object)
{
if (!$object->getId()) {
$object->setCreated($this->formatDate(true));
}
$object->setModified($this->formatDate(true));
return $this;
}
示例2: _beforeSave
/**
* Sets the created and modified date attributes.
*
* @param Mage_Core_Model_Abstract $object
* @return Litle_Palorus_Model_Mysql4_Vault
*/
protected function _beforeSave(Mage_Core_Model_Abstract $object)
{
if (!$object->getId()) {
$object->setCreated(now());
}
$object->setUpdated(now());
return parent::_beforeSave($object);
}
示例3: _beforeSave
protected function _beforeSave(Mage_Core_Model_Abstract $user)
{
if (!$user->getId()) {
$user->setCreated(now());
}
$user->setModified(now());
return $this;
}
示例4: _beforeSave
/**
* Set created/modified values before user save
*
* @param Mage_Core_Model_Abstract $user
* @return Mage_Admin_Model_Resource_User
*/
protected function _beforeSave(Mage_Core_Model_Abstract $user)
{
if ($user->isObjectNew()) {
$user->setCreated($this->formatDate(true));
}
$user->setModified($this->formatDate(true));
return parent::_beforeSave($user);
}