/** * Set collection for pagination * * @param Varien_Data_Collection $collection * @return Mage_Page_Block_Html_Pager */ public function setCollection($collection) { $this->_collection = $collection->setCurPage($this->getCurrentPage()); // If not int - then not limit if ((int) $this->getLimit()) { $this->_collection->setPageSize($this->getLimit()); } $this->_setFrameInitialized(false); return $this; }
/** * Set the current page * Change loaded flag to false * * @param int $page * @return $this */ public function setCurPage($page) { parent::setCurPage($page); $this->_setIsLoaded(false); return $this; }