• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Mage_Core_Model_Resource_Db_Collection_Abstract类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: _afterLoad

 /**
  * Unserialize additional_information in each item
  *
  * @return Mage_Core_Model_Resource_Db_Collection_Abstract
  */
 protected function _afterLoad()
 {
     foreach ($this->_items as $item) {
         $this->getResource()->unserializeFields($item);
     }
     return parent::_afterLoad();
 }
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:12,代码来源:Collection.php


示例2: _afterLoad

 /**
  * Unserialize additional_information in each item
  *
  * @return Mage_Core_Model_Resource_Db_Collection_Abstract
  */
 protected function _afterLoad()
 {
     foreach ($this->_items as $item) {
         $this->getResource()->unserializeFields($item);
     }
     /** @var Mage_Sales_Model_Quote_Payment $item */
     foreach ($this->_items as $item) {
         foreach ($item->getData() as $fieldName => $fieldValue) {
             $item->setData($fieldName, Mage::getSingleton('Mage_Sales_Model_Payment_Method_Converter')->decode($item, $fieldName));
         }
     }
     return parent::_afterLoad();
 }
开发者ID:natxetee,项目名称:magento2,代码行数:18,代码来源:Collection.php


示例3: _renderFiltersBefore

 /**
  * Join store relation table data if store filter is used
  *
  * @return Scandi_MenuManager_Model_Resource_Menu_Collection
  */
 protected function _renderFiltersBefore()
 {
     if ($this->getFilter('store_id')) {
         $this->getSelect()->join(array('store_table' => $this->getTable('scandi_menumanager/menu_store')), 'main_table.menu_id = store_table.menu_id', array())->group('main_table.menu_id');
     }
     return parent::_renderFiltersBefore();
 }
开发者ID:scandiwebcom,项目名称:MagentoMenuManager,代码行数:12,代码来源:Collection.php


示例4: _renderFiltersBefore

 /**
  * Join store relation table if there is store filter
  */
 protected function _renderFiltersBefore()
 {
     if ($this->getFilter('store')) {
         $this->getSelect()->join(array('store_table' => $this->getTable('mgs_storelocator/storelocator_store')), 'main_table.storelocator_id = store_table.storelocator_id', array());
     }
     return parent::_renderFiltersBefore();
 }
开发者ID:ramantalkin,项目名称:tmp01skin,代码行数:10,代码来源:Collection.php


示例5: addItem

 /**
  * Don't add item to the collection if only fixed are allowed and its carrier is not fixed
  *
  * @param Mage_Sales_Model_Quote_Address_Rate $rate
  * @return Mage_Sales_Model_Resource_Quote_Address_Rate_Collection
  */
 public function addItem(Varien_Object $rate)
 {
     if ($this->_allowFixedOnly && (!$rate->getCarrierInstance() || !$rate->getCarrierInstance()->isFixed())) {
         return $this;
     }
     return parent::addItem($rate);
 }
开发者ID:evinw,项目名称:project_bloom_magento,代码行数:13,代码来源:Collection.php


示例6: _afterLoad

 /**
  * Call afterLoad method for each item
  *
  * @return Enterprise_ImportExport_Model_Resource_Scheduled_Operation_Collection
  */
 protected function _afterLoad()
 {
     foreach ($this->_items as $item) {
         $item->afterLoad();
     }
     return parent::_afterLoad();
 }
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:12,代码来源:Collection.php


示例7: __construct

 /**
  * Collection constructor
  *
  * @param Mage_Core_Model_Resource_Db_Abstract $resource
  * @param array $data
  * @throws InvalidArgumentException
  */
 public function __construct($resource = null, $data = array())
 {
     $this->_app = isset($data['app']) ? $data['app'] : Mage::app();
     if (!$this->_app instanceof Mage_Core_Model_App) {
         throw new InvalidArgumentException('Required app object is invalid');
     }
     parent::__construct($resource);
 }
开发者ID:natxetee,项目名称:magento2,代码行数:15,代码来源:Collection.php


示例8: _initSelect

 /**
  * Initialize select object
  *
  * @return Mage_Directory_Model_Resource_Region_Collection
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $locale = Mage::app()->getLocale()->getLocaleCode();
     $this->addBindParam(':region_locale', $locale);
     $this->getSelect()->joinLeft(array('rname' => $this->_regionNameTable), 'main_table.region_id = rname.region_id AND rname.locale = :region_locale', array('name'));
     return $this;
 }
开发者ID:test3metizsoft,项目名称:test,代码行数:13,代码来源:Collection.php


示例9: addFieldToFilter

 /**
  * Redefine default filters
  *
  * @param string $field
  * @param mixed $condition
  * @return Varien_Data_Collection_Db
  */
 public function addFieldToFilter($field, $condition = null)
 {
     if ($field == 'stores') {
         return $this->addStoreFilter($condition);
     } else {
         return parent::addFieldToFilter($field, $condition);
     }
 }
开发者ID:natxetee,项目名称:magento2,代码行数:15,代码来源:Collection.php


示例10: load

 /**
  * Loads collection
  *
  * @param bool $printQuery
  * @param bool $logQuery
  * @return Mage_Tag_Model_Resource_Popular_Collection
  */
 public function load($printQuery = false, $logQuery = false)
 {
     if ($this->isLoaded()) {
         return $this;
     }
     parent::load($printQuery, $logQuery);
     return $this;
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:15,代码来源:Collection.php


示例11: _afterLoad

 protected function _afterLoad()
 {
     parent::_afterLoad();
     foreach ($this->_items as $item) {
         /**  @var Firegento_FlexCms_Model_Content $item */
         $item->afterLoad();
     }
 }
开发者ID:OurLaborisJoy,项目名称:FireGento_FlexCms,代码行数:8,代码来源:Collection.php


示例12: _initSelect

 /**
  * Initialize select, add country iso3 code and region name
  *
  * @return void
  */
 public function _initSelect()
 {
     parent::_initSelect();
     $this->_select->joinLeft(array('country_table' => $this->_countryTable), 'country_table.country_id = main_table.dest_country_id', array('dest_country' => 'iso3_code'))->joinLeft(array('region_table' => $this->_regionTable), 'region_table.region_id = main_table.dest_region_id', array('dest_region' => 'code'));
     $this->addOrder('dest_country', self::SORT_ORDER_ASC);
     $this->addOrder('dest_region', self::SORT_ORDER_ASC);
     $this->addOrder('dest_zip', self::SORT_ORDER_ASC);
     $this->addOrder('condition_value', self::SORT_ORDER_ASC);
 }
开发者ID:okite11,项目名称:frames21,代码行数:14,代码来源:Collection.php


示例13: _afterLoad

 /**
  * join content from firegento_flexcms/content 1:1
  */
 protected function _afterLoad()
 {
     parent::_afterLoad();
     foreach ($this->_items as $item) {
         /** @var Firegento_FlexCms_Model_Content_Link $item */
         $item->setStoreId($this->_storeId);
         $item->addData($item->getContentModel()->getData());
     }
 }
开发者ID:OurLaborisJoy,项目名称:FireGento_FlexCms,代码行数:12,代码来源:Collection.php


示例14: _afterLoadData

 /**
  * @return $this
  */
 protected function _afterLoadData()
 {
     foreach ($this->_data as $data) {
         if (isset($data['additional']) && strlen($data['additional'])) {
             $data['additional'] = Mage::helper('core')->jsonDecode($data['additional']);
         }
     }
     parent::_afterLoadData();
 }
开发者ID:shakhawat4g,项目名称:Magento-Gallery-Extension,代码行数:12,代码来源:Collection.php


示例15: _renderFilters

 protected function _renderFilters()
 {
     if ($this->_isFiltersRendered) {
         return $this;
     }
     parent::_renderFilters();
     $this->_select->where('is_removed = 0');
     return $this;
 }
开发者ID:jsiefer,项目名称:emarketing,代码行数:9,代码来源:Collection.php


示例16: _afterLoad

 /**
  * After load processing
  *
  * @return Enterprise_GiftRegistry_Model_Resource_Item_Collection
  */
 protected function _afterLoad()
 {
     parent::_afterLoad();
     // Assign options and products
     $this->_assignOptions();
     $this->_assignProducts();
     $this->resetItemsDataChanged();
     return $this;
 }
开发者ID:hazaeluz,项目名称:magento_connect,代码行数:14,代码来源:Collection.php


示例17: addFieldToFilter

 /**
  * Add field filter to collection
  *
  * @see self::_getConditionSql for $condition
  * @param string $field
  * @param null|string|array $condition
  * @return Mage_Eav_Model_Entity_Collection_Abstract
  */
 public function addFieldToFilter($field, $condition = null)
 {
     if ($field == 'name') {
         $conditionSql = $this->_getConditionSql($this->getConnection()->getIfNullSql('p.value', 'p_d.value'), $condition);
         $this->getSelect()->where($conditionSql, null, Varien_Db_Select::TYPE_CONDITION);
         return $this;
     } else {
         return parent::addFieldToFilter($field, $condition);
     }
 }
开发者ID:shakhawat4g,项目名称:MagentoExtensions,代码行数:18,代码来源:Collection.php


示例18: _afterLoad

 /**
  * Add stores column
  *
  * @return Enterprise_Banner_Model_Resource_Banner_Collection
  */
 protected function _afterLoad()
 {
     parent::_afterLoad();
     if ($this->getFlag('add_stores_column')) {
         $this->_addStoresVisibility();
     }
     $this->walk('getTypes');
     // fetch banner types from comma-separated
     return $this;
 }
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:15,代码来源:Collection.php


示例19: _construct

 protected function _construct()
 {
     parent::_construct();
     /**
      * Tell Magento the Model and Resource Model to use for this 
      * Collection. Since both aliases are the same we can ommit
      * the second paramater if we wished.
      */
     $this->_init('abhishek_mymodule/staff', 'abhishek_mymodule/staff');
 }
开发者ID:abrawat16,项目名称:Magento-Admin-Custom-Grid,代码行数:10,代码来源:Collection.php


示例20: _afterLoad

 protected function _afterLoad()
 {
     parent::_afterLoad();
     // inject campaign if available
     if ($this->_campaign) {
         /* @var $recipient Mzax_Emarketing_Model_Recipient */
         foreach ($this as $recipient) {
             $recipient->setCampaign($this->_campaign);
         }
     }
 }
开发者ID:jsiefer,项目名称:emarketing,代码行数:11,代码来源:Collection.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Mage_Core_Model_Resource_Setup类代码示例发布时间:2022-05-23
下一篇:
PHP Mage_Core_Model_Resource_Db_Abstract类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap