protected function _prepareCollection() { $collection = Mage::getResourceModel('Mage_User_Model_Resource_Role_Collection'); $collection->setRolesFilter(); $this->setCollection($collection); return parent::_prepareCollection(); }
protected function _prepareCollection() { $roleId = $this->getRequest()->getParam('rid'); Mage::register('RID', $roleId); $collection = Mage::getModel('Mage_User_Model_Role')->getUsersCollection(); $this->setCollection($collection); return parent::_prepareCollection(); }
/** * Prepare data collection for output * * @return Mage_Tag_Model_Resource_Customer_Collection */ protected function _prepareCollection() { if ($this->getCustomerId() instanceof Mage_Customer_Model_Customer) { $this->setCustomerId($this->getCustomerId()->getId()); } /** @var $collection Mage_Tag_Model_Resource_Customer_Collection */ $collection = Mage::getResourceModel('Mage_Tag_Model_Resource_Customer_Collection'); $collection->addCustomerFilter($this->getCustomerId())->addGroupByTag(); $this->setCollection($collection); return parent::_prepareCollection(); }
/** * Apply sorting and filtering to collection * * @return Mage_Backend_Block_Widget_Grid */ protected function _prepareCollection() { if ($this->getCollection()) { parent::_prepareCollection(); if (!$this->_isExport) { $this->getCollection()->load(); $this->_afterLoadCollection(); } } return $this; }
protected function _prepareCollection() { $collection = Mage::getModel('Mage_Tag_Model_Tag')->getResourceCollection()->addProductFilter($this->getProductId())->addPopularity(); $this->setCollection($collection); return parent::_prepareCollection(); }
protected function _prepareCollection() { $collection = Mage::getModel('Mage_Tag_Model_Tag')->getCustomerCollection()->addProductFilter($this->getProductId())->addGroupByTag()->addDescOrder(); $this->setCollection($collection); return parent::_prepareCollection(); }
protected function _prepareCollection() { $collection = Mage::getModel('Mage_User_Model_Role')->getCollection()->setRolesFilter(); $this->setCollection($collection); return parent::_prepareCollection(); }
/** * Prepare collection * * @return Mage_Adminhtml_Block_Review_Grid */ protected function _prepareCollection() { /** @var $model Mage_Review_Model_Review */ $model = Mage::getModel('Mage_Review_Model_Review'); /** @var $collection Mage_Review_Model_Resource_Review_Product_Collection */ $collection = $model->getProductCollection(); if ($this->getProductId() || $this->getRequest()->getParam('productId', false)) { $productId = $this->getProductId(); if (!$productId) { $productId = $this->getRequest()->getParam('productId'); } $this->setProductId($productId); $collection->addEntityFilter($this->getProductId()); } if ($this->getCustomerId() || $this->getRequest()->getParam('customerId', false)) { $customerId = $this->getCustomerId(); if (!$customerId) { $customerId = $this->getRequest()->getParam('customerId'); } $this->setCustomerId($customerId); $collection->addCustomerFilter($this->getCustomerId()); } if (Mage::registry('usePendingFilter') === true) { $collection->addStatusFilter($model->getPendingStatus()); } $collection->addStoreData(); $this->setCollection($collection); return parent::_prepareCollection(); }