public function getPages()
 {
     if (!$this->helper->isActiveEngine()) {
         return parent::getPages();
     }
     if ($this->getLastPageNum() <= $this->_displayPages) {
         return range(1, $this->getLastPageNum());
     } else {
         $half = ceil($this->_displayPages / 2);
         $currentPage = $this->getCurrentPage();
         $lastPageNum = $this->getLastPageNum();
         if ($currentPage >= $half && $currentPage <= $this->getLastPageNum() - $half) {
             $start = $currentPage - $half + 1;
             $finish = $start + $this->_displayPages - 1;
         } elseif ($currentPage < $half) {
             $start = 1;
             $finish = $this->_displayPages;
         } elseif ($currentPage > $lastPageNum - $half) {
             $finish = $lastPageNum;
             $start = $finish - $this->_displayPages + 1;
         }
         return range($start, $finish);
     }
 }