Render Paginator.

@return string
770665
public function render()
    {
        if (!$this->grid->usePagination()) {
            return '';
        }

        return $this->paginationRanger().
            $this->paginationLinks().
            $this->perPageSelector();
    }
350730
protected function buildPagination()
    {
        $this->calculateDisplayRange();
        $pages = array();
        for ($i = $this->displayRangeStart; $i <= $this->displayRangeEnd; $i++) {
            $pages[] = array('number' => $i, 'isCurrent' => ($i === $this->currentPage));
        }
        $pagination = array(
            'pages' => $pages,
            'current' => $this->currentPage,
            'numberOfPages' => $this->numberOfPages,
            'displayRangeStart' => $this->displayRangeStart,
            'displayRangeEnd' => $this->displayRangeEnd,
            'hasLessPages' => $this->displayRangeStart > 2,
            'hasMorePages' => $this->displayRangeEnd + 1 < $this->numberOfPages
        );
        if ($this->currentPage < $this->numberOfPages) {
            $pagination['nextPage'] = $this->currentPage + 1;
        }
        if ($this->currentPage > 1) {
            $pagination['previousPage'] = $this->currentPage - 1;
        }
        return $pagination;
    }
529003
public function render()
    {
        return Html::div( [
            $this->getPreviousPageButton(),
            $this->getPagesSelect(),
            $this->getNextPageButton(),
        ] )->addClass( 'pagination' );
    }
1371125
public function render()
    {
        if (!$this->grid->showPagination()) {
            return '';
        }

        return $this->paginationRanger().
            $this->paginationLinks().
            $this->perPageSelector();
    }
783806
public function render()
    {
        $footer = Html::footer();

        foreach( $this->getRows() as $row )
        {
            $footer->append( $row->render() );
        }

        if( $this->type )
        {
            $footer->addClass( $this->type );
        }

        return $footer;
    }
860321
public function index()
    {
        $templates = IncidentTemplate::query();

        if ($sortBy = Binput::get('sort')) {
            $direction = Binput::has('order') && Binput::get('order') == 'desc';

            $templates->sort($sortBy, $direction);
        }

        $templates = $templates->paginate(Binput::get('per_page', 20));

        return $this->paginator($templates, Request::instance());
    }
931975
protected function _render()
    {
        $viewClass = $this->viewRender();
        $viewClass = App::className($viewClass, 'View', $viewClass == 'View' ? '' : 'View');

        $viewVars = [
            'theme',
            'layoutPath',
            'templatePath',
            'template',
            'layout',
            'helpers',
            'viewVars',
        ];
        $viewOptions = [];
        foreach ($viewVars as $var) {
            $prop = '_' . $var;
            $viewOptions[$var] = $this->{$prop};
        }

        $request = Router::getRequest(true);
        if (!$request) {
            $request = ServerRequestFactory::fromGlobals();
        }

        $View = new $viewClass(
            $request,
            null,
            null,
            $viewOptions
        );

        return $View->render();
    }
1201485
public function render()
    {
        $sOrderReferenceId = $this->_getContainer()->getConfig()->getRequestParameter('amazonOrderReferenceId');

        if ($sOrderReferenceId) {
            $this->_getContainer()->getSession()->setVariable('amazonOrderReferenceId', $sOrderReferenceId);
        }

        return parent::render();
    }
634422
public function render()
    {
        if ($this->isAfterLastPage()) {
            $this->invokeFinishers();
            $parentResponse = $this->response->getParentResponse();
            if ($parentResponse !== null) {
                foreach ($this->response->getHeaders()->getAll() as $key => $value) {
                    $parentResponse->getHeaders()->set($key, $value, true);
                }
            }
            return $this->response->getContent();
        }

        $this->formState->setLastDisplayedPageIndex($this->currentPage->getIndex());

        if ($this->formDefinition->getRendererClassName() === null) {
            throw new RenderingException(sprintf('The form definition "%s" does not have a rendererClassName set.', $this->formDefinition->getIdentifier()), 1326095912);
        }
        $rendererClassName = $this->formDefinition->getRendererClassName();
        $renderer = new $rendererClassName();
        if (!($renderer instanceof RendererInterface)) {
            throw new RenderingException(sprintf('The renderer "%s" des not implement RendererInterface', $rendererClassName), 1326096024);
        }

        $controllerContext = $this->getControllerContext();
        $renderer->setControllerContext($controllerContext);

        $renderer->setFormRuntime($this);
        return $renderer->renderRenderable($this);
    }
756247
public function pagination()
    {
        if ($this->pagination === null) {
            $this->pagination = $this->createPagination();
        }

        return $this->pagination;
    }
312696
public function render()
    {
        if (empty($this->breadcrumbs)) {
            return '';
        }

        $cssClasses = implode(' ', $this->breadcrumbsCssClasses);

        return '<'. $this->listElement . ' itemscope itemtype="http://schema.org/BreadcrumbList"'
                .' class="' . $cssClasses .'">'
                . $this->renderCrumbs()
                . '</'. $this->listElement .'>';
    }
479222
public function render()
    {
        $tmpl = new Eresus_Template($this->getTemplate());

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

        return $tmpl->compile($data);
    }
1229645
public function pages_render()
	{
		// no links if we only have one page
		if ($this->config['total_pages'] == 1)
		{
			return '';
		}

		$html = '';

		// calculate start- and end page numbers
		$start = $this->config['calculated_page'] - floor($this->config['num_links'] * $this->config['link_offset']);
		$end = $this->config['calculated_page'] + floor($this->config['num_links'] * ( 1 - $this->config['link_offset']));

		// adjust for the first few pages
		if ($start < 1)
		{
			$end -= $start - 1;
			$start = 1;
		}

		// make sure we don't overshoot the current page due to rounding issues
		if ($end < $this->config['calculated_page'])
		{
			$start++;
			$end++;
		}

		// make sure we don't overshoot the total
		if ($end > $this->config['total_pages'])
		{
			$start = max(1, $start - $end + $this->config['total_pages']);
			$end = $this->config['total_pages'];
		}

		for($i = intval($start); $i <= intval($end); $i++)
		{
			if ($this->config['calculated_page'] == $i)
			{
				$html .= str_replace(
				    '{link}',
				    str_replace(array('{uri}', '{page}'), array('#', $i), $this->template['active-link']),
				    $this->template['active']
				);
				$this->raw_results[] = array('uri' => '#', 'title' => $i, 'type' => 'active');
			}
			else
			{
				$html .= str_replace(
				    '{link}',
				    str_replace(array('{uri}', '{page}'), array($this->_make_link($i), $i), $this->template['regular-link']),
				    $this->template['regular']
				);
				$this->raw_results[] = array('uri' => $this->_make_link($i), 'title' => $i, 'type' => 'regular');
			}
		}

		return $html;
	}
1092442
public function render()
    {
        $htmlSrc = '<' . $this->containerTag . ' class="' . $this->breadcrumbClass . '">' . PHP_EOL;
        foreach ($this->links as $key => $row) {
            $htmlSrc .= '<' . $this->itemTag . '>' . $row . '</' . $this->itemTag . '>' . PHP_EOL;
        }
        $htmlSrc .= '</' . $this->containerTag . '>' . PHP_EOL;

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

        return view('merchant::content', $items)->render();
    }
938671
protected function _render()
    {
        $renderer = new GridRenderer($this->_grid);
        //ustawianie odpowiedzi
        FrontController::getInstance()->getResponse()
            ->setTypeJson()
            ->setContent(json_encode(['body' => $renderer->renderHeader() . $renderer->renderBody(), 'paginator' => $renderer->renderFooter()]));
        exit;
    }
888415
public function paginate()
    {
        $model = $this->model;

        if (property_exists($model, 'order')) {
            $paginator = $model::orderBy($model::$order, $model::$sort)->paginate($model::$paginate, $model::$index);
        } else {
            $paginator = $model::paginate($model::$paginate, $model::$index);
        }

        if (!$this->isPageInRange($paginator) && !$this->isFirstPage($paginator)) {
            throw new NotFoundHttpException();
        }

        if (count($paginator)) {
            $this->paginateLinks = $paginator->render();
        }

        return $paginator;
    }