Mage_Catalog_Block_Seo_Sitemap_Tree_Pager Class Reference

Inheritance diagram for Mage_Catalog_Block_Seo_Sitemap_Tree_Pager:

Mage_Page_Block_Html_Pager Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getCurrentPage ($displacement=0)
 getLimit ()
 setCollection ($collection)
 getCollection ()
 getFirstNum ()
 setFirstNum ($firstNum)
 getLastNum ()
 setLastNum ($lastNum)
 getTotalNum ()
 setTotalNum ($totalNum)
 isFirstPage ()
 getLastPageNum ()
 setLastPageNum ($lastPageNum)
 isLastPage ()
 getPages ()
 getPreviousPageUrl ()
 getNextPageUrl ()
 getLastPageUrl ()

Protected Attributes

 $_showPerPage = false
 $lastPageNumber = 1
 $_totalNum = 0
 $_firstNum = 0
 $_lastNum = 1


Detailed Description

Definition at line 36 of file Pager.php.


Member Function Documentation

getCollection (  ) 

Returns:
Mage_Core_Model_Mysql4_Collection_Abstract

Reimplemented from Mage_Page_Block_Html_Pager.

Definition at line 82 of file Pager.php.

00083     {
00084         return $this->_collection;
00085     }

getCurrentPage ( displacement = 0  ) 

Definition at line 44 of file Pager.php.

00045     {
00046         if ($page = (int) $this->getRequest()->getParam($this->getPageVarName()) + $displacement) {
00047             if ($page > $this->getLastPageNum()) {
00048                 return $this->getLastPageNum();
00049             }
00050             return $page;
00051         }
00052         return 1;
00053     }

getFirstNum (  ) 

Reimplemented from Mage_Page_Block_Html_Pager.

Definition at line 87 of file Pager.php.

00088     {
00089         return $this->_firstNum + 1;
00090     }

getLastNum (  ) 

Reimplemented from Mage_Page_Block_Html_Pager.

Definition at line 98 of file Pager.php.

00099     {
00100         return $this->_lastNum;
00101     }

getLastPageNum (  ) 

Reimplemented from Mage_Page_Block_Html_Pager.

Definition at line 125 of file Pager.php.

00126     {
00127         return $this->_lastPageNumber;
00128     }

getLastPageUrl (  ) 

Reimplemented from Mage_Page_Block_Html_Pager.

Definition at line 174 of file Pager.php.

00175     {
00176         return $this->getPageUrl($this->getLastPageNum());
00177     }

getLimit (  ) 

Reimplemented from Mage_Page_Block_Html_Pager.

Definition at line 55 of file Pager.php.

00056     {
00057         $limits = $this->getAvailableLimit();
00058 //        if ($limit = $this->getRequest()->getParam($this->getLimitVarName())) {
00059 //            if (isset($limits[$limit])) {
00060 //                return $limit;
00061 //            }
00062 //        }
00063         $limits = array_keys($limits);
00064         return $limits[0];
00065     }

getNextPageUrl (  ) 

Reimplemented from Mage_Page_Block_Html_Pager.

Definition at line 169 of file Pager.php.

00170     {
00171         return $this->getPageUrl($this->getCurrentPage(+1));
00172     }

getPages (  ) 

Reimplemented from Mage_Page_Block_Html_Pager.

Definition at line 141 of file Pager.php.

00142     {
00143         $pages = array();
00144         if ($this->getLastPageNum() <= $this->_displayPages) {
00145             $pages = range(1, $this->getLastPageNum());
00146         } else {
00147             $half = ceil($this->_displayPages / 2);
00148             if ($this->getCurrentPage() >= $half && $this->getCurrentPage() <= $this->getLastPageNum() - $half) {
00149                 $start  = ($this->getCurrentPage() - $half) + 1;
00150                 $finish = ($start + $this->_displayPages) - 1;
00151             } elseif ($this->getCurrentPage() < $half) {
00152                 $start  = 1;
00153                 $finish = $this->_displayPages;
00154             } elseif ($this->getCurrentPage() > ($this->getLastPageNum() - $half)) {
00155                 $finish = $this->getLastPageNum();
00156                 $start  = $finish - $this->_displayPages + 1;
00157             }
00158             $pages = range($start, $finish);
00159         }
00160 
00161         return $pages;
00162     }

getPreviousPageUrl (  ) 

Reimplemented from Mage_Page_Block_Html_Pager.

Definition at line 164 of file Pager.php.

00165     {
00166         return $this->getPageUrl($this->getCurrentPage(-1));
00167     }

getTotalNum (  ) 

Reimplemented from Mage_Page_Block_Html_Pager.

Definition at line 109 of file Pager.php.

00110     {
00111         return $this->_totalNum;
00112     }

isFirstPage (  ) 

Reimplemented from Mage_Page_Block_Html_Pager.

Definition at line 120 of file Pager.php.

00121     {
00122         return $this->getCurrentPage() == 1;
00123     }

isLastPage (  ) 

Reimplemented from Mage_Page_Block_Html_Pager.

Definition at line 136 of file Pager.php.

00137     {
00138         return $this->getCurrentPage() >= $this->getLastPageNum();
00139     }

setCollection ( collection  ) 

Reimplemented from Mage_Page_Block_Html_Pager.

Definition at line 67 of file Pager.php.

00068     {
00069         $this->_collection = $collection;
00070 //            ->setCurPage($this->getCurrentPage());
00071         // If not int - then not limit
00072 //        if ((int) $this->getLimit()) {
00073 //            $this->_collection->setPageSize($this->getLimit());
00074 //        }
00075 
00076         return $this;
00077     }

setFirstNum ( firstNum  ) 

Definition at line 92 of file Pager.php.

00093     {
00094         $this->_firstNum = $firstNum;
00095         return $this;
00096     }

setLastNum ( lastNum  ) 

Definition at line 103 of file Pager.php.

00104     {
00105         $this->_lastNum = $lastNum;
00106         return $this;
00107     }

setLastPageNum ( lastPageNum  ) 

Definition at line 130 of file Pager.php.

00131     {
00132         $this->_lastPageNumber = $lastPageNum;
00133         return $this;
00134     }

setTotalNum ( totalNum  ) 

Definition at line 114 of file Pager.php.

00115     {
00116         $this->_totalNum = $totalNum;
00117         return $this;
00118     }


Member Data Documentation

$_firstNum = 0 [protected]

Definition at line 41 of file Pager.php.

$_lastNum = 1 [protected]

Definition at line 42 of file Pager.php.

$_showPerPage = false [protected]

Reimplemented from Mage_Page_Block_Html_Pager.

Definition at line 38 of file Pager.php.

$_totalNum = 0 [protected]

Definition at line 40 of file Pager.php.

$lastPageNumber = 1 [protected]

Definition at line 39 of file Pager.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:37 2009 for Magento by  doxygen 1.5.8