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


PHP Mage_Adminhtml_Block_Widget_Grid::setCollection方法代码示例

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


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

示例1: setCollection

 public function setCollection($collection)
 {
     $collection->getSelect();
     /* ->joinleft(array('ncs'=>'newsletter_contest_subcriber'),'ncs.last_contest_id=main_table.contest_id',array('last_contest_id'))
        ->joinleft(array('ns'=>'newsletter_subscriber'),'ns.subscriber_id=ncs.subscriber_id',array('subscriber_status'))
        ->group('main_table.contest_participant_id');*/
     parent::setCollection($collection);
 }
开发者ID:par-orillonsoft,项目名称:magento-contests,代码行数:8,代码来源:Grid.php

示例2: setCollection

 public function setCollection($collection)
 {
     $collection->getSelect()->join(array('sfo' => Mage::getSingleton('core/resource')->getTableName('sales_flat_order')), 'main_table.order_id = sfo.entity_id', array('main_table.order_id as entity_id', 'start_datetime', 'end_datetime', 'send_datetime', 'return_datetime'));
     /**
      * Join send return table and remove rows that are blank dates for return
      * and end_date (due date) is after today
      */
     $collection->getSelect()->join(array('s2' => Mage::getSingleton('core/resource')->getTableName('payperrentals/sendreturn')), 'main_table.order_id = s2.order_id', array('return_date', 'res_enddate'))->group('s2.order_id');
     $collection->addAttributeToFilter('s2.return_date', array(array("eq" => '0000-00-00 00:00:00'), array("eq" => '1970-01-01 00:00:00')));
     $collection->addAttributeToFilter('s2.res_enddate', array("lt" => date('Y-m-d H:i:s')));
     parent::setCollection($collection);
     return parent::_prepareCollection();
 }
开发者ID:hueyl77,项目名称:fourwindsgear,代码行数:13,代码来源:Grid.php

示例3: setCollection

 public function setCollection($collection)
 {
     $listing = Mage::helper('M2ePro/Data_Global')->getValue('temp_data');
     $storeId = 0;
     if ($listing) {
         $storeId = $listing['store_id'];
     }
     $collection->setStoreId($storeId);
     /** @var $ruleModel Ess_M2ePro_Model_Magento_Product_Rule */
     $ruleModel = Mage::helper('M2ePro/Data_Global')->getValue('rule_model');
     $ruleModel->setAttributesFilterToCollection($collection);
     parent::setCollection($collection);
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:13,代码来源:Abstract.php

示例4: _prepareCollection

 protected function _prepareCollection()
 {
     $helper = Mage::helper('mailinglist');
     //$data = $helper->getAllSubscribersInfo();
     $data = $helper->getAllSubscribers();
     $total = $helper->getCollectionTotal();
     $current_offset = $helper->getCurrentOffset();
     $collection = new Varien_Data_Collection();
     foreach ($data as $item) {
         $varienObject = new Varien_Object();
         $varienObject->setSubscriberId($item['id']);
         $varienObject->setEmail($item['email']);
         $varienObject->setFirstName($item['first_name']);
         $varienObject->setLastName($item['last_name']);
         $collection->addItem($varienObject);
     }
     parent::setCollection($collection);
     return parent::_prepareCollection();
 }
开发者ID:swsnow,项目名称:lexiconn_mailinglist,代码行数:19,代码来源:Grid.php

示例5: setCollection

 public function setCollection($collection)
 {
     $this->_prepareCache(clone $collection);
     parent::setCollection($collection);
 }
开发者ID:ppkowalski,项目名称:M2E,代码行数:5,代码来源:Grid.php

示例6: setCollection

 /**
  * Set collection object
  *
  * @param Varien_Data_Collection $collection
  * @return mixed
  */
 public function setCollection($collection)
 {
     if (!is_null($this->_blcg_typeModel)) {
         $this->_blcg_typeModel->beforeGridSetCollection($this, $collection);
     }
     $return = parent::setCollection($collection);
     if (!is_null($this->_blcg_typeModel)) {
         $this->_blcg_typeModel->afterGridSetCollection($this, $collection);
     }
     return $return;
 }
开发者ID:aram93,项目名称:mage-enhanced-admin-grids,代码行数:17,代码来源:Rewrite.php


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