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


PHP Mage_Core_Model_Abstract::load方法代码示例

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


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

示例1: load

 public function load($id, $field = null)
 {
     if (is_null($id)) {
         return $this->noRoutePage();
     }
     return parent::load($id, $field);
 }
开发者ID:eguchi,项目名称:Magento-Rack-Ketai,代码行数:7,代码来源:Page.php

示例2: load

 /**
  * Load object data
  *
  * @param   integer $id
  * @return  Mage_Core_Model_Abstract
  */
 public function load($id, $field = null)
 {
     $this->setData(array());
     $this->_quote = null;
     parent::load($id, $field);
     return $this;
 }
开发者ID:Jonathonbyrd,项目名称:Optimized-Magento-1.9.x,代码行数:13,代码来源:Order.php

示例3: load

 public function load($id, $field = null)
 {
     parent::load($id, $field);
     if ($this->getStoreId()) {
         $this->getMultiStoreValue();
     }
     return $this;
 }
开发者ID:sshegde123,项目名称:wmp8,代码行数:8,代码来源:Banner.php

示例4: load

 public function load($id = false, $column = false)
 {
     parent::load($id, 'order_id');
     if (!$this->getId()) {
         $this->setId($id);
     }
     return $this;
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:8,代码来源:Queue.php

示例5: load

	/**
	 * Loads the associated attachment meta data
	 * This data is stored as a serialized array
	 *
	 * @param int $id
	 * @param string $field
	 * @return Fishpig_Wordpress_Model_Post_Attachment_Abstract
	 */
	public function load($id, $field = null)
	{
		parent::load($id, $field);
		
		$this->loadSerializedData();

		return $this;
	}
开发者ID:riteshsahu1981,项目名称:captainkyso,代码行数:16,代码来源:Abstract.php

示例6: load

 public function load($id, $field = null)
 {
     if (is_null($field) && !is_numeric($id)) {
         $this->_name = $id;
         return parent::load($this->getSignature(), 'signature');
     }
     return parent::load($id, $field);
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:8,代码来源:Product.php

示例7: load

 /**
  * @param int $id
  * @param null $field
  * @return ISM_Slider_Model_Slider
  */
 public function load($id, $field = null)
 {
     if (!intval($id) && is_string($id)) {
         $field = 'identifier';
     }
     parent::load($id, $field);
     return $this;
 }
开发者ID:xiaoguizhidao,项目名称:bilderrahmen,代码行数:13,代码来源:Slider.php

示例8: _loadExistingModel

 /**
  * Load a model by attribute code
  *
  * @param  Mage_Core_Model_Abstract $model
  * @param  string                   $attributeCode
  * @param  string                   $value
  * @return Mage_Core_Model_Abstract
  */
 protected function _loadExistingModel($model, $attributeCode, $value)
 {
     foreach ($model->getCollection() as $singleModel) {
         if ($singleModel->getData($attributeCode) == $value) {
             $model->load($singleModel->getId());
             return $model;
         }
     }
     return $model;
 }
开发者ID:hsq,项目名称:Ho_Setup,代码行数:18,代码来源:Abstract.php

示例9: load

 public function load($id, $field = null)
 {
     parent::load($id, $field);
     Mage::dispatchEvent($this->_eventPrefix . '_load_store_value_before', $this->_getEventData());
     if ($this->getStoreId()) {
         $this->loadStoreValue();
     }
     Mage::dispatchEvent($this->_eventPrefix . '_load_store_value_after', $this->_getEventData());
     return $this;
 }
开发者ID:radovandodic,项目名称:portreitsurgery,代码行数:10,代码来源:Account.php

示例10: loadByCode

 public function loadByCode($code)
 {
     if (empty($code) || strlen($code) > self::GIFT_CARD_CODE_MAX_LENGTH) {
         return $this;
     }
     $collection = $this->getCollection()->addFieldToFilter('code', $code)->setPageSize(1);
     if ($collection->count() == 0) {
         return $this;
     }
     return parent::load($collection->getFirstItem()->getId());
 }
开发者ID:ahsanmage,项目名称:vr,代码行数:11,代码来源:Giftcard.php

示例11: load

 public function load($id, $field = null)
 {
     parent::load($id, $field);
     if ($this->getIsDeleted()) {
         return Mage::getModel('giftvoucher/giftvoucher');
     }
     if ($this->getStatus() == Magestore_Giftvoucher_Model_Status::STATUS_ACTIVE && $this->getExpiredAt() && $this->getExpiredAt() < now()) {
         $this->setStatus(Magestore_Giftvoucher_Model_Status::STATUS_EXPIRED);
     }
     return $this;
 }
开发者ID:CherylMuniz,项目名称:fashion,代码行数:11,代码来源:Giftvoucher.php

示例12: load

 public function load($id, $field = null)
 {
     $store_id = $this->getStoreId();
     if (!$store_id) {
         return parent::load($id, $field = null);
     }
     $cat = Mage::getModel('faq/categorystore')->loadByCatIdStore($id, $store_id);
     $this->setData($cat->getData());
     $this->setId($id);
     return $this;
 }
开发者ID:Thinlt,项目名称:simicart,代码行数:11,代码来源:Category.php

示例13: _getItem

 /**
  * @return Lanot_Core_Block_Adminhtml_Grid_Abstract
  */
 protected function _getItem()
 {
     if ($this->_item !== null) {
         return $this->_item;
     }
     $itemId = $this->getRequest()->getParam($this->_itemParam);
     $this->_item = $this->_getItemModel();
     if ($itemId) {
         $this->_item->load($itemId);
     }
     return $this->_item;
 }
开发者ID:monarcmoso,项目名称:beta2,代码行数:15,代码来源:Abstract.php

示例14: load

 public function load($id, $field = null)
 {
     $store_id = $this->getStoreId();
     if (!$store_id) {
         return parent::load($id, $field = null);
     }
     $faq = Mage::getModel('faq/faqstore')->loadByFaqIdStore($id, $store_id);
     if ($faq->getIsApplied() == '0') {
         $this->setData($faq->getData());
     } elseif ($faq->getIsApplied() == '1' && !Mage::getSingleton('admin/session')->isLoggedIn()) {
         parent::load($id, $field = null);
     } else {
         $this->setData($faq->getData());
     }
     $this->setId($id);
     return $this;
 }
开发者ID:Thinlt,项目名称:simicart,代码行数:17,代码来源:Faq.php

示例15: load

 public function load($id, $field = null)
 {
     parent::load($id, $field);
     $xml = Mage::getConfig()->getNode('modules/' . $id);
     $this->setId($id);
     $this->setDepends(array());
     if ($xml) {
         $data = $xml->asCanonicalArray();
         if (isset($data['depends']) && is_array($data['depends'])) {
             $data['depends'] = array_keys($data['depends']);
         } else {
             $data['depends'] = array();
         }
         $this->addData($data);
     }
     return $this;
 }
开发者ID:buttasg,项目名称:cowgirlk,代码行数:17,代码来源:Module.php


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