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


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怎么用?PHP Mage_Core_Model_Resource_Db_Collection_Abstract使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Mage_Core_Model_Resource_Db_Collection_Abstract类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: _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

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

示例4: 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

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

示例6: __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

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

示例8: 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

示例9: 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

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

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

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

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

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

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


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