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


PHP Mage_Core_Model_Abstract::unsetData方法代码示例

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


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

示例1: unsetData

 public function unsetData($key = null)
 {
     parent::unsetData($key);
     if (is_null($key)) {
         $this->_items = null;
     }
     return $this;
 }
开发者ID:arslbbt,项目名称:mangentovies,代码行数:8,代码来源:Order.php

示例2: _beforeSave

 /**
  * Action before save
  *
  * @param Mage_Core_Model_Abstract $role
  * @return Mage_Api_Model_Resource_Roles
  */
 protected function _beforeSave(Mage_Core_Model_Abstract $role)
 {
     if ($role->getId() == '') {
         if ($role->getIdFieldName()) {
             $role->unsetData($role->getIdFieldName());
         } else {
             $role->unsetData('id');
         }
     }
     if ($role->getPid() > 0) {
         $row = $this->load($role->getPid());
     } else {
         $row = array('tree_level' => 0);
     }
     $role->setTreeLevel($row['tree_level'] + 1);
     $role->setRoleName($role->getName());
     return $this;
 }
开发者ID:monkviper,项目名称:magento-lite,代码行数:24,代码来源:Roles.php

示例3: _beforeSave

 /**
  * Set required fields before saving model
  *
  * @param Mage_Core_Model_Abstract $object
  * @return $this
  */
 protected function _beforeSave(Mage_Core_Model_Abstract $object)
 {
     if (!$object->getData('store_ids')) {
         $object->setData('store_ids', array(Mage::app()->getStore(true)->getId()));
     }
     if ($object->getId()) {
         $object->getAttributeModel();
         $object->unsetData('attribute_id');
     }
     if (!$this->_pageIsUniqueToStores($object)) {
         throw new Exception('A page already exists for this attribute and store combination.');
     }
     return parent::_beforeSave($object);
 }
开发者ID:sreichel,项目名称:magento-Fishpig-Attribute-Splash-Pages,代码行数:20,代码来源:Page.php

示例4: _beforeSave

 /**
  * Apply processing before saving object
  *
  * @param Mage_Core_Model_Abstract $object
  */
 protected function _beforeSave(Mage_Core_Model_Abstract $object)
 {
     if (!$object->getSlideCode()) {
         throw new Exception(Mage::helper('banners')->__('Banner Slides must have a unique code'));
     }
     $object->setSlideCode($this->formatSlideCode($object->getSlideCode()));
     if (Mage::getDesign()->getArea() == 'adminhtml') {
         foreach ($object->getData() as $field => $value) {
             if (preg_match("/^use_config_([a-zA-Z_]{1,})\$/", $field, $result)) {
                 $object->setData($result[1], null);
                 $object->unsetData($field);
             }
         }
     }
     return parent::_beforeSave($object);
 }
开发者ID:igorvasiliev4,项目名称:magento_code,代码行数:21,代码来源:Slides.php

示例5: unsetData

 /**
  * Unset data from the object.
  *
  * $key can be a string only. Array will be ignored.
  *
  * $isChanged will specify if the object needs to be saved after an update.
  *
  * @param string $key
  * @param boolean $isChanged
  * @return Mage_Catalog_Model_Abstract
  */
 public function unsetData($key = null)
 {
     if (!is_null($key) && $this->isLockedAttribute($key) || $this->isReadonly()) {
         return $this;
     }
     return parent::unsetData($key);
 }
开发者ID:hirentricore,项目名称:devmagento,代码行数:18,代码来源:Abstract.php

示例6: unsetData

 /**
  * Unsets the data at the given key.
  * 
  * Overridden to add an $unset operation for when the object is saved.
  * 
  * @param string $key
  * @return Cm_Mongo_Model_Abstract
  */
 public function unsetData($key = null)
 {
     if (!is_null($key) && $this->isObjectNew() === FALSE && !isset($this->getResource()->getFieldMappings()->{$key}->required)) {
         $this->op('$unset', $key, 1);
     }
     return parent::unsetData($key);
 }
开发者ID:walexer,项目名称:magento-mongo,代码行数:15,代码来源:Abstract.php

示例7: __construct

 protected $_correspondents;
 public function __construct($args = array())
 {
     $this->_init('alekseon_mailTransport/sentEmail');
 }
开发者ID:danielwalterrodrigues,项目名称:asus,代码行数:5,代码来源:SentEmail.php


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