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


PHP Mage_Core_Model_Resource_Db_Abstract::_afterLoad方法代码示例

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


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

示例1: _afterLoad

 /**
  * Perform actions after object load
  *
  * @param Mage_Core_Model_Abstract $object
  * @return Mage_Core_Model_Resource_Db_Abstract
  */
 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     if ($object->getChanges() && !is_array($object->getChanges())) {
         $object->setChanges(Zend_Json::decode($object->getChanges()));
     }
     return parent::_afterLoad($object);
 }
开发者ID:OurLaborisJoy,项目名称:FireGento_FlexCms,代码行数:13,代码来源:Changes.php

示例2: _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

示例3: _afterLoad

 /**
  * Perform actions after object load
  *
  * @param Varien_Object $object
  * @return Enterprise_Reward_Model_Resource_Reward_History
  */
 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     parent::_afterLoad($object);
     if (is_string($object->getData('additional_data'))) {
         $object->setData('additional_data', unserialize($object->getData('additional_data')));
     }
     return $this;
 }
开发者ID:barneydesmond,项目名称:propitious-octo-tribble,代码行数:14,代码来源:History.php

示例4: _afterLoad

 /**
  * Perform operations after object load
  *
  * @access public
  * @param Mage_Core_Model_Abstract $object
  * @return Ibrams_CmsExtended_Model_Resource_Cmspage
  * @author Ultimate Module Creator
  */
 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     if ($object->getId()) {
         $stores = $this->lookupStoreIds($object->getId());
         $object->setData('store_id', $stores);
     }
     return parent::_afterLoad($object);
 }
开发者ID:pboethig,项目名称:vagrant_puppet_magento,代码行数:16,代码来源:Cmspage.php

示例5: _afterLoad

 /**
  * Perform actions after object load
  *
  * @param Mage_Widget_Model_Widget_Instance $object
  * @return Mage_Widget_Model_Resource_Widget_Instance
  */
 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     $adapter = $this->_getReadAdapter();
     $select = $adapter->select()->from($this->getTable('widget/widget_instance_page'))->where('instance_id = ?', (int) $object->getId());
     $result = $adapter->fetchAll($select);
     $object->setData('page_groups', $result);
     return parent::_afterLoad($object);
 }
开发者ID:evinw,项目名称:project_bloom_magento,代码行数:14,代码来源:Instance.php

示例6: _afterLoad

 /**
  * @param Webguys_Easytemplate_Model_Template $object
  * @return Mage_Core_Model_Resource_Db_Abstract
  */
 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     // TODO: Solve this workaround
     if ($object->getValidFrom()) {
         $object->setValidFrom(date('Y-m-d', strtotime($object->getValidFrom())));
     }
     if ($object->getValidTo()) {
         $object->setValidTo(date('Y-m-d', strtotime($object->getValidTo())));
     }
     return parent::_afterLoad($object);
 }
开发者ID:EliasKotlyar,项目名称:EasyTemplate,代码行数:15,代码来源:Template.php

示例7: _afterLoad

 /**
  * Unserialize system report data
  *
  * @param Mage_Core_Model_Abstract $object
  *
  * @return Enterprise_Support_Model_Resource_Sysreport
  */
 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     try {
         $data = unserialize($object->getReportData());
     } catch (Exception $e) {
         Mage::throwException(Mage::helper('enterprise_support')->__('There was an error while loading system report data.'));
         $data = array();
     }
     $object->setReportData($data);
     parent::_afterLoad($object);
     return $this;
 }
开发者ID:barneydesmond,项目名称:propitious-octo-tribble,代码行数:19,代码来源:Sysreport.php

示例8: _afterLoad

 /**
  * @param Mage_Core_Model_Abstract $object
  *
  * @return $this|Mage_Core_Model_Resource_Db_Abstract
  */
 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     $select = $this->_getReadAdapter()->select()->from($this->getTable('store'))->where('slideshow_id = ?', $object->getId());
     if ($data = $this->_getReadAdapter()->fetchAll($select)) {
         $storesArray = array();
         foreach ($data as $row) {
             $storesArray[] = $row['store_id'];
         }
         $object->setData('store_id', $storesArray);
     }
     return parent::_afterLoad($object);
 }
开发者ID:remiebeling,项目名称:MageProfis_Slideshow,代码行数:17,代码来源:Slideshow.php

示例9: _afterLoad

 /**
  * Actions after load
  *
  * @param Mage_Rating_Model_Rating $object
  * @return Mage_Rating_Model_Resource_Rating
  */
 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     parent::_afterLoad($object);
     if (!$object->getId()) {
         return $this;
     }
     $adapter = $this->_getReadAdapter();
     $bind = array(':rating_id' => (int) $object->getId());
     // load rating titles
     $select = $adapter->select()->from($this->getTable('rating/rating_title'), array('store_id', 'value'))->where('rating_id=:rating_id');
     $result = $adapter->fetchPairs($select, $bind);
     if ($result) {
         $object->setRatingCodes($result);
     }
     // load rating available in stores
     $object->setStores($this->getStores((int) $object->getId()));
     return $this;
 }
开发者ID:ravi2jdesign,项目名称:solvingmagento_1.7.0,代码行数:24,代码来源:Rating.php

示例10: _afterLoad

 /**
  * Add store data to wrapping data
  *
  * @param  Mage_Core_Model_Abstract $object
  * @return Mage_Core_Model_Resource_Db_Abstract
  */
 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     $adapter = $this->_getReadAdapter();
     $select = $adapter->select()->from($this->_storeAttributesTable, array('scope' => $adapter->getCheckSql('store_id = 0', $adapter->quote('default'), $adapter->quote('store')), 'design'))->where('wrapping_id = ?', $object->getId())->where('store_id IN (0,?)', $object->getStoreId());
     $data = $adapter->fetchAssoc($select);
     if (isset($data['store']) && is_array($data['store'])) {
         foreach ($data['store'] as $key => $value) {
             $object->setData($key, $value !== null ? $value : $data['default'][$key]);
             $object->setData($key . '_store', $value);
         }
     } else {
         if (isset($data['default'])) {
             foreach ($data['default'] as $key => $value) {
                 $object->setData($key, $value);
             }
         }
     }
     return parent::_afterLoad($object);
 }
开发者ID:barneydesmond,项目名称:propitious-octo-tribble,代码行数:25,代码来源:Wrapping.php

示例11: _afterLoad

 /**
  * Add store date to registry type data
  *
  * @param Mage_Core_Model_Abstract $object
  * @return Mage_Core_Model_Resource_Db_Abstract
  */
 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     $adapter = $this->_getReadAdapter();
     $scopeCheckExpr = $adapter->getCheckSql('store_id = 0', $adapter->quote('default'), $adapter->quote('store'));
     $storeIds = array(Mage_Core_Model_App::ADMIN_STORE_ID);
     if ($object->getStoreId()) {
         $storeIds[] = (int) $object->getStoreId();
     }
     $select = $adapter->select()->from($this->_infoTable, array('scope' => $scopeCheckExpr, 'label', 'is_listed', 'sort_order'))->where('type_id = ?', (int) $object->getId())->where('store_id IN (?)', $storeIds);
     $data = $adapter->fetchAssoc($select);
     if (isset($data['store']) && is_array($data['store'])) {
         foreach ($data['store'] as $key => $value) {
             $object->setData($key, $value !== null ? $value : $data['default'][$key]);
             $object->setData($key . '_store', $value);
         }
     } elseif (isset($data['default']) && is_array($data['default'])) {
         foreach ($data['default'] as $key => $value) {
             $object->setData($key, $value);
         }
     }
     return parent::_afterLoad($object);
 }
开发者ID:barneydesmond,项目名称:propitious-octo-tribble,代码行数:28,代码来源:Type.php

示例12: _afterLoad

 /**
  * Perform actions after object is loaded
  *
  * @param Mage_Core_Model_Abstract $object
  * @return Mage_Core_Model_Resource_Db_Abstract
  */
 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     if ($object->getId()) {
         $object->setTypeById($object->getData('type_id'));
         $object->setCustomValues(unserialize($object->getCustomValues()));
     }
     return parent::_afterLoad($object);
 }
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:14,代码来源:Entity.php

示例13: _afterLoad

 /**
  * Perform actions after object load
  *
  * @param Varien_Object $object
  * @return Mage_Core_Model_Resource_Db_Abstract
  */
 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     parent::_afterLoad($object);
     // Add information about quote to visitor
     $adapter = $this->_getReadAdapter();
     $select = $adapter->select()->from($this->getTable('log/quote_table'), 'quote_id')->where('visitor_id = ?', $object->getId())->order('quote_id DESC')->limit(1);
     $result = $adapter->query($select)->fetch();
     if (isset($result['quote_id'])) {
         $object->setQuoteId((int) $result['quote_id']);
     }
     return $this;
 }
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:18,代码来源:Visitor.php

示例14: _afterLoad

 /**
  * Method to run after load
  *
  * @param Mage_Core_Model_Abstract $object
  * @return Mage_Core_Model_Resource_Db_Abstract
  */
 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     $select = $this->_getReadAdapter()->select()->from($this->getTable('checkout/agreement_store'), array('store_id'))->where('agreement_id = :agreement_id');
     if ($stores = $this->_getReadAdapter()->fetchCol($select, array(':agreement_id' => $object->getId()))) {
         $object->setData('store_id', $stores);
     }
     return parent::_afterLoad($object);
 }
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:14,代码来源:Agreement.php

示例15: _afterLoad

 /**
  * Perform operations after object load
  *
  * @access public
  * @param Mage_Core_Model_Abstract $object
  * @return DB1_AnyMarket_Model_Resource_Anymarketimage
  * 
  */
 protected function _afterLoad(Mage_Core_Model_Abstract $object)
 {
     return parent::_afterLoad($object);
 }
开发者ID:AnyMarket,项目名称:magento,代码行数:12,代码来源:Anymarketimage.php


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