当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Core_Model_Abstract::setUpdateTime方法代码示例

本文整理汇总了PHP中Mage_Core_Model_Abstract::setUpdateTime方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Abstract::setUpdateTime方法的具体用法?PHP Mage_Core_Model_Abstract::setUpdateTime怎么用?PHP Mage_Core_Model_Abstract::setUpdateTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Core_Model_Abstract的用法示例。


在下文中一共展示了Mage_Core_Model_Abstract::setUpdateTime方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _beforeSave

 /**
  * Some processing prior to saving to database - processes the given images
  * and the store configuration
  *
  * @param Mage_Core_Model_Abstract $object Current faq item
  */
 protected function _beforeSave(Mage_Core_Model_Abstract $object)
 {
     if (!$object->getId()) {
         $object->setCreationTime(Mage::getSingleton('core/date')->gmtDate());
     }
     $object->setUpdateTime(Mage::getSingleton('core/date')->gmtDate());
 }
开发者ID:booklein,项目名称:bookle,代码行数:13,代码来源:Theme.php

示例2: _beforeSave

 /**
  * Some processing prior to saving to database - processes the given images
  * and the store configuration
  *
  * @param Mage_Core_Model_Abstract $object Current faq item
  */
 protected function _beforeSave(Mage_Core_Model_Abstract $object)
 {
     if (!$object->getId()) {
         $object->setCreationTime(Mage::getSingleton('core/date')->gmtDate());
     }
     $object->setPublicationTime(Mage::app()->getLocale()->date($object->getPublicationTime(), Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT), null, false)->toString(Varien_Date::DATETIME_INTERNAL_FORMAT));
     $object->setUpdateTime(Mage::getSingleton('core/date')->gmtDate());
 }
开发者ID:axovel,项目名称:exqzt,代码行数:14,代码来源:Faq.php

示例3: _beforeSave

 /**
  *
  *
  * @param Mage_Core_Model_Abstract $object
  */
 protected function _beforeSave(Mage_Core_Model_Abstract $object)
 {
     if (!$object->getId()) {
         $object->setCreationTime(now());
     }
     $object->setUpdateTime(now());
     return $this;
 }
开发者ID:arslbbt,项目名称:mangentovies,代码行数:13,代码来源:Block.php

示例4: _beforeSave

 /**
  * Process category data before saving
  *
  * @param Mage_Core_Model_Abstract $object
  * @return Zeon_Faq_Model_Mysql4_Category
  */
 protected function _beforeSave(Mage_Core_Model_Abstract $object)
 {
     // modify create / update dates
     if ($object->isObjectNew() && !$object->hasCreationTime()) {
         $object->setCreationTime(Mage::getSingleton('core/date')->gmtDate());
     }
     $object->setUpdateTime(Mage::getSingleton('core/date')->gmtDate());
     return parent::_beforeSave($object);
 }
开发者ID:Jonathonbyrd,项目名称:Optimized-Magento-1.9.x,代码行数:15,代码来源:Category.php

示例5: _beforeSave

 protected function _beforeSave(Mage_Core_Model_Abstract $object)
 {
     if (!$object->getId()) {
         $object->setCreationTime(Mage::getSingleton('core/date')->gmtDate());
     }
     $object->setUpdateTime(Mage::getSingleton('core/date')->gmtDate());
     $object->setContent(serialize($object->getContentDecode()));
     return $this;
 }
开发者ID:ahsanmage,项目名称:vr,代码行数:9,代码来源:Area.php

示例6: _beforeSave

 /**
  * Process popup data before saving
  *
  * @param Mage_Core_Model_Abstract $object
  * @return Etailers_Popup_Model_Resource_Popup
  */
 protected function _beforeSave(Mage_Core_Model_Abstract $object)
 {
     /*
      * For two attributes which represent timestamp data in DB
      * we should make converting such as:
      * If they are empty we need to convert them into DB
      * type NULL so in DB they will be empty and not some default value
      */
     // modify create / update dates
     if ($object->isObjectNew() && !$object->hasCreationTime()) {
         $object->setCreationTime(Mage::getSingleton('core/date')->gmtDate());
     }
     $object->setUpdateTime(Mage::getSingleton('core/date')->gmtDate());
     return parent::_beforeSave($object);
 }
开发者ID:purpleweb,项目名称:magento-popup,代码行数:21,代码来源:Popup.php

示例7: _beforeSave

 /**
  * Process page data before saving
  *
  * @param   Mage_Core_Model_Abstract $object
  */
 protected function _beforeSave(Mage_Core_Model_Abstract $object)
 {
     foreach (array('date_closed', 'update_time') as $dataKey) {
         if (!$object->getData($dataKey)) {
             $object->setData($dataKey, new Zend_Db_Expr('NULL'));
         }
     }
     $todayDate = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
     // if is new item creation time is now
     if (!$object->getDatePosted()) {
         $object->setDatePosted($todayDate);
     }
     // update time is now
     $object->setUpdateTime($todayDate);
     return $this;
 }
开发者ID:zmarius81,项目名称:Magento-News-Module,代码行数:21,代码来源:News.php

示例8: _beforeSave

 protected function _beforeSave(Mage_Core_Model_Abstract $object)
 {
     /*
      * For two attributes which represent timestamp data in DB
      * we should make converting such as:
      * If they are empty we need to convert them into DB
      * type NULL so in DB they will be empty and not some default value
      */
     foreach (array('custom_theme_from', 'custom_theme_to') as $field) {
         $value = !$object->getData($field) ? null : $object->getData($field);
         $object->setData($field, $this->formatDate($value));
     }
     // modify create / update dates
     if ($object->isObjectNew() && !$object->hasCreationTime()) {
         $object->setCreationTime(Mage::getSingleton('core/date')->gmtDate());
     }
     $object->setUpdateTime(Mage::getSingleton('core/date')->gmtDate());
     return parent::_beforeSave($object);
 }
开发者ID:technomagegithub,项目名称:olgo.nl,代码行数:19,代码来源:Version.php


注:本文中的Mage_Core_Model_Abstract::setUpdateTime方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。