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


PHP Mage_Core_Model_Abstract::setData方法代码示例

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


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

示例1: _afterLoad

 /**
  * Add customer group ids and website ids to rule data after load
  *
  * @param Mage_Core_Model_Abstract $object
  *
  * @return Mage_SalesRule_Model_Resource_Rule
  */
 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     $object->setData('customer_group_ids', (array) $this->getCustomerGroupIds($object->getId()));
     $object->setData('website_ids', (array) $this->getWebsiteIds($object->getId()));
     parent::_afterLoad($object);
     return $this;
 }
开发者ID:natxetee,项目名称:magento2,代码行数:14,代码来源:Rule.php

示例2: setCounter

 /**
  * Sets the counter
  * Overwrites the counter for a certain block id with a new counter array
  *
  * @param string $sIdBlock
  * @param array $aCounter
  * @return Sitewards_Captcha_Model_CaptchaChecker
  */
 private function setCounter($sIdBlock, $aCounter)
 {
     $aCaptchaCheckerSession = $this->oCustomerSession->getData('captchachecker');
     $aCaptchaCheckerSession[$sIdBlock] = $aCounter;
     $this->oCustomerSession->setData('captchachecker', $aCaptchaCheckerSession);
     return $this;
 }
开发者ID:sitewards,项目名称:captcha,代码行数:15,代码来源:CaptchaChecker.php

示例3: _beforeSave

 protected function _beforeSave(Mage_Core_Model_Abstract $object)
 {
     if (is_null($object->getOrigData())) {
         $object->setData('create_date', Mage::helper('M2ePro')->getCurrentGmtDate());
     }
     $object->setData('update_date', Mage::helper('M2ePro')->getCurrentGmtDate());
     return $this;
 }
开发者ID:par-orillonsoft,项目名称:app,代码行数:8,代码来源:Listings.php

示例4: _afterLoad

 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     if ($object->getId()) {
         $stores = $this->lookupStoreIds($object->getId());
         $object->setData('store_id', $stores);
         $object->setData('stores', $stores);
     }
     return parent::_afterLoad($object);
 }
开发者ID:ahsanmage,项目名称:vr,代码行数:9,代码来源:Page.php

示例5: _afterLoad

 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     if ($object->getData('segments_codes')) {
         if (is_string($object->getData('segments_codes'))) {
             $object->setData('segments_codes', explode(',', $object->getData('segments_codes')));
         }
     } else {
         $object->setData('segments_codes', array());
     }
 }
开发者ID:CherylMuniz,项目名称:fashion,代码行数:10,代码来源:Subscriber.php

示例6: _beforeSave

 /**
  * Also serialize additional information
  *
  * @param Mage_Core_Model_Abstract $payment
  */
 protected function _beforeSave(Mage_Core_Model_Abstract $payment)
 {
     $additionalInformation = $payment->getData('additional_information');
     if (empty($additionalInformation)) {
         $payment->setData('additional_information', null);
     } elseif (is_array($additionalInformation)) {
         $payment->setData('additional_information', serialize($additionalInformation));
     }
     return parent::_beforeSave($payment);
 }
开发者ID:hunnybohara,项目名称:magento-chinese-localization,代码行数:15,代码来源:Payment.php

示例7: _afterLoad

 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     $areas = @unserialize($object->getData('areas_content'));
     if (is_array($areas)) {
         $object->setData('areas_content', $areas);
     } else {
         $object->setData('areas_content', array('content' => $object->getData('areas_content')));
     }
     return $this;
 }
开发者ID:ashfaqphplhr,项目名称:artificiallawnsforturf,代码行数:10,代码来源:Template.php

示例8: _beforeSave

 protected function _beforeSave(Mage_Core_Model_Abstract $object)
 {
     if (is_array($object->getData('value'))) {
         $object->setData('value_serialized', serialize($object->getData('value')));
     }
     if (is_array($object->getData('target'))) {
         $object->setData('target_serialized', serialize($object->getData('target')));
     }
     Mage::dispatchEvent('webforms_logic_before_save', array('logic' => $object));
     return parent::_beforeSave($object);
 }
开发者ID:monarcmoso,项目名称:beta2,代码行数:11,代码来源:Logic.php

示例9: _afterLoad

 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     if ($object->getData('segments_cut')) {
         $object->setData('segments_cut', explode(',', $object->getData('segments_cut')));
     } else {
         $object->setData('segments_cut', array());
     }
     if ($object->getData('segments_paste')) {
         $object->setData('segments_paste', explode(',', $object->getData('segments_paste')));
     } else {
         $object->setData('segments_paste', array());
     }
 }
开发者ID:xiaoguizhidao,项目名称:magento,代码行数:13,代码来源:Automanagement.php

示例10: _afterLoad

 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     $webform = Mage::getModel('webforms/webforms')->load($object->getData('webform_id'));
     $select = $this->_getReadAdapter()->select()->from($this->getTable('webforms/results_values'))->where('result_id = ?', $object->getId());
     $values = $this->_getReadAdapter()->fetchAll($select);
     foreach ($values as $val) {
         $object->setData('field_' . $val['field_id'], $val['value']);
         $object->setData('key_' . $val['field_id'], $val['key']);
     }
     $object->setData('ip', long2ip($object->getCustomerIp()));
     Mage::dispatchEvent('webforms_result_load', array('webform' => $webform, 'result' => $object));
     return parent::_afterLoad($object);
 }
开发者ID:xiaoguizhidao,项目名称:BumblebeeSite,代码行数:13,代码来源:Results.php

示例11: _beforeSave

 protected function _beforeSave(Mage_Core_Model_Abstract $object)
 {
     $currentTimestamp = Mage::helper('M2ePro')->getCurrentGmtDate();
     if (is_null($object->getOrigData())) {
         $object->setData('create_date', $currentTimestamp);
         $object->setData('synch_date', $currentTimestamp);
     }
     $object->setData('update_date', $currentTimestamp);
     if ($object->getOrigData('synch_date') != $object->getData('synch_date') && $object->getData('synch_date') == $object->getOrigData('update_date')) {
         $object->setData('synch_date', $object->getData('update_date'));
     }
     return $this;
 }
开发者ID:par-orillonsoft,项目名称:app,代码行数:13,代码来源:ListingsTemplates.php

示例12: _afterLoad

 /**
  * @param Mage_Core_Model_Abstract $object
  * @return self
  */
 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     if ($object->getId()) {
         $recipients = $this->lookupRecipients($object->getId());
         $object->setData('recipients', $recipients);
         if ($details = $this->lookupDetails($object->getId())) {
             unset($details['trigger_id']);
             foreach ($details as $name => $value) {
                 $object->setData($name, $value);
             }
         }
     }
     return parent::_afterLoad($object);
 }
开发者ID:WeareJH,项目名称:esendex-magento-extension,代码行数:18,代码来源:AdminSalesReport.php

示例13: setPost

	/**
	 * Set the post this comment is associated to
	 *
	 * @param Fishpig_Wordpress_Model_Post $post
	 * @return Fishpig_Wordpress_Model_Post_Comment
	 */
	public function setPost(Fishpig_Wordpress_Model_Post $post)
	{
		$this->setPostId($post->getId());
		$this->setData('comment_post_ID', $post->getId());

		return parent::setData('post', $post);
	}
开发者ID:riteshsahu1981,项目名称:captainkyso,代码行数:13,代码来源:Comment.php

示例14: _afterLoad

 /**
  * @param Mage_Core_Model_Abstract $object
  * @return Mage_Core_Model_Resource_Db_Abstract
  */
 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     if ($object->getData('additional')) {
         $object->setData('additional', Mage::helper('core')->jsonDecode($object->getData('additional')));
     }
     return parent::_afterLoad($object);
 }
开发者ID:shakhawat4g,项目名称:Magento-Gallery-Extension,代码行数:11,代码来源:Item.php

示例15: processFile

 /**
  * Uploads single file and set the relative file path in the model
  *
  * @param Mage_Core_Model_Abstract $object
  * @param Jarlssen_UploaderComponent_Model_Config $config
  *
  * @throws Exception
  */
 public function processFile(Mage_Core_Model_Abstract $object, Jarlssen_UploaderComponent_Model_Config $config)
 {
     $inputName = $config->getInputName();
     $uploadPath = $config->getAbsoluteUploadPath();
     try {
         if ($result = $this->_upload($config, $uploadPath, $_FILES[$inputName]['name'])) {
             $fileName = $result['file'];
             $relativeFilePath = $config->getRelativeUploadPath() . DS . $fileName;
             $object->setData($inputName, $relativeFilePath);
         }
     } catch (Exception $e) {
         $object->setData($inputName, $object->getOrigData($inputName));
         Mage::logException($e);
         throw new Exception($e->getMessage(), $e->getCode(), $e);
     }
 }
开发者ID:kirchbergerknorr,项目名称:Jarlssen_UploaderComponent,代码行数:24,代码来源:Uploader.php


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