private function createPaginationItems()
    {
        // Grab overrides if present
        $linkClass = $this->getOption('linkClass', 'page-link');
        $itemClass = $this->getOption('itemClass', 'page-item');
        $itemActiveClass = $this->getOption('itemActiveClass', 'page-item active');
        $previousCaption = ' &laquo; ' . $this->getOption('previousCaption', '');
        $nextCaption = $this->getOption('nextCaption', '') . ' &raquo; ';

        // To be returned
        $items = array();

        // First - check if first previous page available
        if ($this->paginator->hasPreviousPage()) {
            $items[] = $this->createListItem($itemClass, $this->renderLink($previousCaption, $this->paginator->getPreviousPageUrl(), $linkClass));
        }

        foreach ($this->paginator->getPageNumbers() as $page) {
            if (is_numeric($page)) {
                $currentClass = $this->paginator->isCurrentPage($page) ? $itemActiveClass : $itemClass;
                $items[] = $this->createListItem($currentClass, $this->renderLink($page, $this->paginator->getUrl($page), $linkClass));
            } else {
                $items[] = $this->createListItem($itemClass, $this->renderLink($page, '#', $linkClass));
            }
        }

        // Last - check if next page available
        if ($this->paginator->hasNextPage()) {
            $items[] = $this->createListItem($itemClass, $this->renderLink($nextCaption, $this->paginator->getNextPageUrl(), $linkClass));
        }

        return $items;
    }
private function createPaginationItems()
    {
        // Grab overrides if present
        $linkClass = $this->getOption('linkClass', 'page-link');
        $itemClass = $this->getOption('itemClass', 'page-item');
        $itemActiveClass = $this->getOption('itemActiveClass', 'page-item active');
        $previousCaption = ' &laquo; ' . $this->getOption('previousCaption', '');
        $nextCaption = $this->getOption('nextCaption', '') . ' &raquo; ';

        // To be returned
        $items = array();

        // First - check if first previous page available
        if ($this->paginator->hasPreviousPage()) {
            $items[] = $this->createListItem($itemClass, $this->renderLink($previousCaption, $this->paginator->getPreviousPageUrl(), $linkClass));
        }

        foreach ($this->paginator->getPageNumbers() as $page) {
            if (is_numeric($page)) {
                $currentClass = $this->paginator->isCurrentPage($page) ? $itemActiveClass : $itemClass;
                $items[] = $this->createListItem($currentClass, $this->renderLink($page, $this->paginator->getUrl($page), $linkClass));
            } else {
                $items[] = $this->createListItem($itemClass, $this->renderLink($page, '#', $linkClass));
            }
        }

        // Last - check if next page available
        if ($this->paginator->hasNextPage()) {
            $items[] = $this->createListItem($itemClass, $this->renderLink($nextCaption, $this->paginator->getNextPageUrl(), $linkClass));
        }

        return $items;
    }
private function createPaginationItems ( ) { // Grab overrides if present $ linkClass = $ this -> getOption ( 'linkClass' , 'page-link' ) ; $ itemClass = $ this -> getOption ( 'itemClass' , 'page-item' ) ; $ itemActiveClass = $ this -> getOption ( 'itemActiveClass' , 'page-item active' ) ; $ previousCaption = ' &laquo; ' . $ this -> getOption ( 'previousCaption' , '' ) ; $ nextCaption = $ this -> getOption ( 'nextCaption' , '' ) . ' &raquo; ' ; // To be returned $ items = array ( ) ; // First - check if first previous page available if ( $ this -> paginator -> hasPreviousPage ( ) ) { $ items [ ] = $ this -> createListItem ( $ itemClass , $ this -> renderLink ( $ previousCaption , $ this -> paginator -> getPreviousPageUrl ( ) , $ linkClass ) ) ; } foreach ( $ this -> paginator -> getPageNumbers ( ) as $ page ) { if ( is_numeric ( $ page ) ) { $ currentClass = $ this -> paginator -> isCurrentPage ( $ page ) ? $ itemActiveClass : $ itemClass ; $ items [ ] = $ this -> createListItem ( $ currentClass , $ this -> renderLink ( $ page , $ this -> paginator -> getUrl ( $ page ) , $ linkClass ) ) ; } else { $ items [ ] = $ this -> createListItem ( $ itemClass , $ this -> renderLink ( $ page , '#' , $ linkClass ) ) ; } } // Last - check if next page available if ( $ this -> paginator -> hasNextPage ( ) ) { $ items [ ] = $ this -> createListItem ( $ itemClass , $ this -> renderLink ( $ nextCaption , $ this -> paginator -> getNextPageUrl ( ) , $ linkClass ) ) ; } return $ items ; }
Create navigation items

@return array
Create navigation items