本文整理汇总了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);
}
示例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();
}
示例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);
}
示例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();
}
示例5: setCollection
public function setCollection($collection)
{
$this->_prepareCache(clone $collection);
parent::setCollection($collection);
}
示例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;
}