本文整理汇总了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);
}
示例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;
}
示例3: load
public function load($id, $field = null)
{
parent::load($id, $field);
if ($this->getStoreId()) {
$this->getMultiStoreValue();
}
return $this;
}
示例4: load
public function load($id = false, $column = false)
{
parent::load($id, 'order_id');
if (!$this->getId()) {
$this->setId($id);
}
return $this;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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());
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}