Renders paginator.
@return void
165756
public function render()
	{
		$paginator = $this->getPaginator();
		$page = $paginator->page;
		if ($paginator->pageCount < 2) {
			$steps = array($page);
		} else {
			$arr = range(max($paginator->firstPage, $page - 3), min($paginator->lastPage, $page + 3));
			if ($this->countBlocks) {
				$quotient = ($paginator->pageCount - 1) / $this->countBlocks;
				for ($i = 0; $i <= $this->countBlocks; $i++) {
					$arr[] = round($quotient * $i) + $paginator->firstPage;
				}
			}
			sort($arr);
			$steps = array_values(array_unique($arr));
		}

		$this->template->steps = $steps;
		$this->template->paginator = $paginator;
		$this->template->isAjax = $this->isAjax;
		$this->template->handle = 'showPage!';

		$this->template->setFile($this->getTemplateFile());
		$this->template->render();
	}
1167125
public function renderPagebrowser()
    {
        /** @var \TYPO3\CMS\Fluid\View\StandaloneView $view */
        $view = GeneralUtility::makeInstance(\TYPO3\CMS\Fluid\View\StandaloneView::class);
        $view->setTemplateRootPaths($this->conf['view']['templateRootPaths']);
        $view->setTemplate('Widget/Pagination');
        $pagination = [];

        $numberOfResults = $this->numberOfResults;
        $resultsPerPage = $this->conf['resultsPerPage'];
        $maxPages = $this->conf['maxPagesInPagebrowser'];

        // get total number of items to show
        // show pagebrowser only if there are more entries that are shown on one page
        if ($numberOfResults > $resultsPerPage) {
            $this->limit = $resultsPerPage;
        } else {
            return;
        }

        // set db limit
        $start = ($this->piVars['page'] * $resultsPerPage) - $resultsPerPage;
        $this->dbLimit = $start . ',' . $resultsPerPage;
        $end = ($start + $resultsPerPage > $numberOfResults) ? $numberOfResults : ($start + $resultsPerPage);

        // number of pages
        $pagesTotal = ceil($numberOfResults / $resultsPerPage);

        // calculate start and end page
        $startPage = $this->piVars['page'] - ceil(($maxPages / 2));
        $endPage = $startPage + $maxPages - 1;
        if ($startPage < 1) {
            $startPage = 1;
            $endPage = $startPage + $maxPages - 1;
        }
        if ($startPage > $pagesTotal) {
            $startPage = $pagesTotal - $maxPages + 1;
            $endPage = $pagesTotal;
        }
        if ($endPage > $pagesTotal) {
            $startPage = $pagesTotal - $maxPages + 1;
            $endPage = $pagesTotal;
        }

        // create pages list, previous, current and next for pagination widget
        $pages = [];
        for ($i = 1; $i <= $pagesTotal; $i++) {
            if ($i >= $startPage && $i <= $endPage) {
                $pages[] = $i;
            }
        }
        $pagination['pages'] = $pages;

        if ($this->piVars['page'] > 1) {
            $pagination['previous'] = $this->piVars['page'] - 1;
        }

        if ($this->piVars['page'] < $pagesTotal) {
            $pagination['next'] = $this->piVars['page'] + 1;
        }

        $pagination['currentPage'] = $this->piVars['page'];
        $view->assign('pagination', $pagination);

        // render pagebrowser content and pass it together with some variables to fluid template
        $markerArray = array(
            'current' => $this->piVars['page'],
            'pages_total' => $pagesTotal,
            'pages_list' => $view->render(),
            'start' => $start + 1,
            'end' => $end,
            'total' => $numberOfResults,
            'results' => $this->pi_getLL('results'),
            'until' => $this->pi_getLL('until'),
            'of' => $this->pi_getLL('of'),
        );

        // hook for additional markers in pagebrowser
        if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['pagebrowseAdditionalMarker'])) {
            foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['pagebrowseAdditionalMarker'] as $_classRef) {
                $_procObj = &GeneralUtility::makeInstance($_classRef);
                $_procObj->pagebrowseAdditionalMarker(
                    $markerArray,
                    $this
                );
            }
        }

        $this->fluidTemplateVariables['pagebrowser'] = $markerArray;
    }
938666
public function render() {
		
		$router = Router::getInstance();
		
		// count can’t be null
		if (!$this->count) {
			return '';
		}
		
		// round the page count
		$pages = (int)ceil((int)$this->count / $this->perPage);
		
		// hide bar in case of 1 page only
		if ($pages < 2 and $this->hideEmpty) {
			return '';
		}
		
		// start main pagination DOM object
		$render = '<div class="pagination"><nav aria-label="Page navigation"><ul class="pagination">';
		
		// left arrow for first page
		if ($this->page > 1) {
			$render .= '<li class="page-item arrow"><a class="page-link" href="' . $router->getPageUrl(1) . '">«</a></li>';
		}

		// calculate page range
		if ($this->page > 5 and $this->page+5 > $pages) {
			$max = $pages;
			$min = ($max-10) > 0 ? $max-10 : 1;
		} else if ($this->page <= 5) {
			$min = 1;
			$max = $pages < 10 ? $pages : 10;
		} else {
			$min = ($this->page-5) > 0 ? $this->page-5 : 1;
			$max = ($this->page+5 <= $pages) ? $this->page+5 : $pages;
		}

		// render all pages number
		for ($i=$min; $i <= $max; $i++) {
			
			if ($i==$this->page) {
				$render .= '<li class="page-item current active"><a class="page-link" href="' . $router->getPageUrl($i) . '">' . $i . '</a></li>';
			} else {
				$render .= '<li class="page-item"><a class="page-link" href="' . $router->getPageUrl($i) . '">' . $i . '</a></li>';
			}
			
		}
		
		// right arrow for last page
		if ($this->page < $pages) {
			$render .= '<li class="page-item arrow"><a class="page-link" href="' . $router->getPageUrl($pages) . '">»</a></li>';
		}
		
		// close the bar
		$render .= '</ul></nav></div>';
		
		return $render;
		
	}
995499
public function actionPagination()
    {
        Yii::$app->session->set($this->MainModel . 'Pagination', Yii::$app->request->queryParams['records']);
        $this->redirect(['index']);
    }
264978
private function render()
    {
        $str = $this->args['container_start'];

        if ($this->args['show_parent'] && $this->parent_page_id !== false) {
            $str .= $this->get_parent_link_html();
        }

        foreach ($this->pages as $page) {
            $str .= $this->get_link_html($page);
        }

        $str .= $this->args['container_end'];
        echo $str;
    }
746997
private function render()
    {
        $this->do_action('afw_options_pre_render');
        $layout = new Layout\Layout( $this->config );
        $layout->render(true);
        add_filter('admin_footer_text', array( __CLASS__, 'footer_credits' ) );
        $this->do_action('afw_options_post_render');
    }
806218
public function render()
    {
        //calculate iteration
        $iteration = (int) ceil($this->total/$this->per_page) + $this->config['start_page'] - 1 ;

        if($iteration==0)
            return;
        $item_to_show = $this->config['item_to_show'];
        $first_item_max = $item_to_show  -1 ;
        $last_item_min = $iteration +1 - $item_to_show ;
        $print_array = array();
        if($this->config['skip_item']){
            //calculate pagination print
            for($i=0;$i<=$first_item_max;$i++){
                $print_array[$i] = true;
            }
            for($i=$last_item_min;$i<=$iteration;$i++){
                $print_array[$i] = true;
            }
            if(!isset($print_array[$this->current_page-$item_to_show-1])){
                $print_array[$this->current_page-$item_to_show-1]='skip';
            }
            if(!isset($print_array[$this->current_page+$item_to_show+1])){
                $print_array[$this->current_page+$item_to_show+1]='skip';
            }
            for($i=$this->current_page;$i<=$this->current_page+$item_to_show;$i++){
                $print_array[$i] = true;
            }
            for($i=$this->current_page-$item_to_show;$i<=$this->current_page;$i++){
                $print_array[$i] = true;
            }
        }
        for( $i=$this->config['start_page'] ; $i<=$iteration   ; $i++){
            if($this->config['skip_item']){
                if(!isset($print_array[$i]))
                    continue;
                if($print_array[$i]==='skip'){
                    echo $this->config['skip_tag_open'];
                    echo "{$this->config['skip_tag_text']}";
                    echo $this->config['skip_tag_close'];
                    continue;
                }
            }
            
            $page_number = $i+1 - $this->config['start_page'];
                        
            //prev
            if( $i == $this->config['start_page'] && $this->current_page != $this->config['start_page'] ){
                // if($this->current_page == 1 )
                    // $prev_url = str_replace('$paginate','', $this->base_url);
                // if($i!=$this->current_page)
                    $prev_url = str_replace('$paginate',$this->current_page-1, $this->base_url);
                // else
                    // $prev_url ="#";
                echo $this->config['prev_tag_open'];
                echo "<a href='{$prev_url}' $this->config['link_attribute'] >{$this->config['prev_tag_text']}</a>";
                echo $this->config['prev_tag_close'];
            }
            $url = str_replace('$paginate',$i, $this->base_url);
            //current
            if($i==$this->current_page){
                echo $this->config['cur_tag_open'];
                echo "<a href='{$url}' $this->config['link_attribute_active'] >$page_number </a>";
                echo $this->config['cur_tag_close'];
            }
            //first
            elseif($i==$this->config['start_page'] ){
                // $url = str_replace('$paginate','', $this->base_url);
                echo $this->config['first_tag_open'];
                echo "<a href='{$url}' $this->config['link_attribute'] >$page_number </a>";
                echo $this->config['first_tag_close'];
            }
            //last
            elseif($i==$iteration){
                echo $this->config['last_tag_open'];
                echo "<a href='{$url}' $this->config['link_attribute'] >$page_number </a>";
                echo $this->config['last_tag_close'];
            }
            
            else{
                echo $this->config['num_tag_open'];
                echo "<a href='{$url}' $this->config['link_attribute'] >$page_number </a>";
                echo $this->config['num_tag_close'];
            }
            
            //next
            if($i==$iteration){
                if($i!=$this->current_page)
                    $next_url = str_replace('$paginate',$this->current_page+1, $this->base_url);
                else
                    $next_url="#";
                echo $this->config['next_tag_open'];
                echo "<a href='{$next_url}' $this->config['link_attribute'] >{$this->config['next_tag_text']}</a>";
                echo $this->config['next_tag_close'];
            }
            $print_skip = true;
            
        }
    }
1124938
public function render()
    {
        \OxidEsales\Eshop\Application\Controller\FrontendController::render();
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        $this->_iAllArtCnt = 0;

        if ($oActiveRecommList = $this->getActiveRecommList()) {
            if (($oList = $this->getArticleList()) && $oList->count()) {
                $this->_iAllArtCnt = $oActiveRecommList->getArtCount();
            }

            if ($myConfig->getConfigParam('bl_rssRecommListArts')) {
                /** @var \OxidEsales\Eshop\Application\Model\RssFeed $oRss */
                $oRss = oxNew(\OxidEsales\Eshop\Application\Model\RssFeed::class);
                $this->addRssFeed(
                    $oRss->getRecommListArticlesTitle($oActiveRecommList),
                    $oRss->getRecommListArticlesUrl($this->_oActiveRecommList),
                    'recommlistarts'
                );
            }
        } else {
            if (($oList = $this->getRecommLists()) && $oList->count()) {
                $oRecommList = oxNew(\OxidEsales\Eshop\Application\Model\RecommendationList::class);
                $this->_iAllArtCnt = $oRecommList->getSearchRecommListCount($this->getRecommSearch());
            }
        }

        if (!($oList = $this->getArticleList())) {
            $oList = $this->getRecommLists();
        }

        if ($oList && $oList->count()) {
            $iNrofCatArticles = (int) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iNrofCatArticles');
            $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 10;
            $this->_iCntPages = ceil($this->_iAllArtCnt / $iNrofCatArticles);
        }
        // processing list articles
        $this->_processListArticles();

        return $this->_sThisTemplate;
    }
1236150
public function render()
    {
        if (!$this->hasPages())
            return '';

        return sprintf(
            '<div><ul class="pagination">%s %s %s</ul></div>',
            $this->getPreviousButton(),
            $this->getLinks(),
            $this->getNextButton()
        );
    }
1136113
public function render()
    {
        // Count the max command length as column width.
        foreach ($this->items as $item) {
            /** @var $item AbstractCommand */
            $length = strlen($item->getName());

            if ($length > $this->maxLength) {
                $this->maxLength = $length;
            }
        }

        return parent::render();
    }
1040730
public function render()
    {
        $items = [
            'header'      => $this->header,
            'description' => $this->description,
            'breadcrumb'  => $this->breadcrumb,
            'content'     => $this->build(),
        ];

        return view('merchant::content', $items)->render();
    }
1371125
public function render()
    {
        if (!$this->grid->showPagination()) {
            return '';
        }

        return $this->paginationRanger().
            $this->paginationLinks().
            $this->perPageSelector();
    }
1209923
public function render()
    {
        // Get the page range based on constructor properties and build the main pagination
        $content = $this->getPageRange($this->startLink, $this->endLink);

        // Build the edge links
        $prev = $this->getPrevious(Config::get('pagination::frame.prev_link_text'));
        $next = $this->getNext(Config::get('pagination::frame.next_link_text'));
        $first = $this->getFirst(Config::get('pagination::frame.first_link_text'));
        $last = $this->getLast(Config::get('pagination::frame.last_link_text'));

        // Build the whole pagination
        return Config::get('pagination::show_first_last')
            ? $first . $prev . $content . $next . $last
            : $prev . $content . $next;
    }
473867
public function render()
    {
        if (!$this->visible) {
            return;
        }

        if ($this->sensitive) {
            $anchor = new SwatHtmlTag('a');

            if ($this->link_value === null) {
                $anchor->href = $this->link;
            } elseif (is_array($this->link_value)) {
                $anchor->href = vsprintf($this->link, $this->link_value);
            } else {
                $anchor->href = sprintf($this->link, $this->link_value);
            }

            $anchor->open();
        }

        parent::render();

        if ($this->sensitive) {
            $anchor->close();
        }
    }
748765
public function render()
    {
        $paginationData = $this->paginator->getPages();
        $previous       = $this->getElement()->spawnChild('li');
        $next           = $this->getElement()->spawnChild('li');
        $previousAnchor = $previous->spawnChild('a')->setContent($this->getPrevLabel());
        $nextAnchor     = $next->spawnChild('a')->setContent($this->getNextLabel());

        $this->getElement()->addAttributes($this->getListAttributes());

        $previousAnchor->setAttributes($this->getPreviousAttributes());
        $nextAnchor->setAttributes($this->getNextAttributes());

        if (empty($paginationData->previous)) {
            $previous->addClass('disabled');
        } else {
            $previousAnchor->addAttribute('data-page', $paginationData->previous);
            $previousAnchor->addAttribute('href', $this->getUrl(
                $this->getRoute(),
                array_merge(
                    array('page' => $paginationData->previous),
                    $this->getRouteParams()
                )
            ));
        }

        if (empty($paginationData->next)) {
            $next->addClass('disabled');
        } else {
            $nextAnchor->addAttribute('data-page', $paginationData->next);
            $nextAnchor->addAttribute('href', $this->getUrl(
                $this->getRoute(),
                array_merge(
                    array('page' => $paginationData->next),
                    $this->getRouteParams()
                )
            ));
        }

        if ($this->align) {
            $previous->addClass('previous');
            $next->addClass('next');
        }

        return $this->getElement()->render();
    }
104838
protected function render()
    {
        $this->display('* Rendering documents');
        foreach ($this->documents as $file => &$document) {
            $this->display(' -> Rendering '.$file.'...');
            $target = $this->getTargetOf($file);

            $directory = dirname($target);
            if (!is_dir($directory)) {
                mkdir($directory, 0755, true);
            }

            file_put_contents($target, $document->renderDocument());
        }
    }
479222
public function render()
    {
        $tmpl = new Eresus_Template($this->getTemplate());

        $data = array('pagination' => $this);

        return $tmpl->compile($data);
    }