Render an HTML pagination control.

@return string
425101
public function toHtml()
    {
        if($this->getNumPages() <= 1)
        {
            return '';
        }

        $this->renderer->setPaginator($this);
        return $this->renderer->render();
    }
501991
public function render($html = null) {
		$control = $this->getPaginator()->getPaginationControl();
		
		// First
		if ($this->_useFirstLast && isset($control[PaginatorInterface::CONTROL_FIRST])) {
			$this->addElement(
				$this->_renderUrl($control[PaginatorInterface::CONTROL_FIRST]),
				$this->_stringFirst,
				'page-first'
			);
		}
		
		// Previous
		if ($this->_usePrevNext && isset($control[PaginatorInterface::CONTROL_PREVIOUS])) {
			$this->addElement(
				$this->_renderUrl($control[PaginatorInterface::CONTROL_PREVIOUS]),
				$this->_stringPrev,
				'page-previous'
			);
		}
		
		// Range
		if ($this->_useRange && isset($control[PaginatorInterface::CONTROL_RANGE])) {
			foreach ($control[PaginatorInterface::CONTROL_RANGE] as $element) {
				$this->addElement($this->_renderUrl($element), $element, 'page-' . $element);
			}
		}
		
		// Next
		if ($this->_usePrevNext && isset($control[PaginatorInterface::CONTROL_NEXT])) {
			$this->addElement(
				$this->_renderUrl($control[PaginatorInterface::CONTROL_NEXT]),
				$this->_stringNext,
				'page-next'
			);
		}
		
		// Last
		if ($this->_useFirstLast && isset($control[PaginatorInterface::CONTROL_LAST])) {
			$this->addElement(
				$this->_renderUrl($control[PaginatorInterface::CONTROL_LAST]),
				$this->_stringLast,
				'page-last'
			);
		}
		
		if (isset($control[PaginatorInterface::CONTROL_CURRENT])) {
			$this->setActive('page-' . $control[PaginatorInterface::CONTROL_CURRENT]);
		}
		
		return parent::render();
	}
1346571
public function render()
    {
        $this->prepareVars();

        if ($this->partial) {
            return $this->controller->makePartial($this->partial);
        }

        return $this->makePartial('search');
    }
688229
public function render()
    {
        if (!$this->grid->showExportBtn()) {
            return '';
        }

        $this->setUpScripts();

        $trans = [
            'export'        => trans('admin.export'),
            'all'           => trans('admin.all'),
            'current_page'  => trans('admin.current_page'),
            'selected_rows' => trans('admin.selected_rows'),
        ];

        $page = request('page', 1);

        return <<<EOT

<div class="btn-group pull-right" style="margin-right: 10px">
    <a class="btn btn-sm btn-twitter" title="{$trans['export']}"><i class="fa fa-download"></i><span class="hidden-xs"> {$trans['export']}</span></a>
    <button type="button" class="btn btn-sm btn-twitter dropdown-toggle" data-toggle="dropdown">
        <span class="caret"></span>
        <span class="sr-only">Toggle Dropdown</span>
    </button>
    <ul class="dropdown-menu" role="menu">
        <li><a href="{$this->grid->getExportUrl('all')}" target="_blank">{$trans['all']}</a></li>
        <li><a href="{$this->grid->getExportUrl('page', $page)}" target="_blank">{$trans['current_page']}</a></li>
        <li><a href="{$this->grid->getExportUrl('selected', '__rows__')}" target="_blank" class='{$this->grid->getExportSelectedName()}'>{$trans['selected_rows']}</a></li>
    </ul>
</div>
EOT;
    }
567908
public function render()
    {
        $html = [];

        foreach ($this->all() as $key => $value) {
            if (is_null($value)) {
                continue;
            }

            if (is_numeric($key)) {
                $key = $value;
            }

            $html[] = $key . '="' . e($value) . '"';
        }

        return implode(' ', array_filter($html));
    }
108864
public function render() {
	
		$ret = '<button type="' . $this->type . '"' ;
	
		if ($this->id) {
			$ret .= 'id=' . $this->id;
		}
	
		if ($this->name) {
			$ret .= ' ' . $this->getNameProperty();
		}
	
		$ret .= $this->processProperties() . '>';
	
		if ($this->faIcon) {
			$ret .= '<i class="fa ' . $this->faIcon . '"></i> ';
		}
	
		$ret .= trim(htmlspecialchars($this->value)) . ' </button>';
	
		return $ret;
	
	}
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()
        );
    }
1076907
public function paginator()
    {
        $paginator = $this->paginate();

        if (!is_null($this->presenter)) {
            return (new $this->presenter($paginator))->render();
        }

        return $paginator->render();
    }
479222
public function render()
    {
        $tmpl = new Eresus_Template($this->getTemplate());

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

        return $tmpl->compile($data);
    }
9937
public function render()
	{
		// make sure we have a correct url
		$this->paginationUrl();

		// and a current page number
		$this->calculateNumbers();

		$urls = array();

		// generate the URL's for the pagination block
		if ($this->config['totalPages'] > 1)
		{
			// calculate start- and end page numbers
			$start = $this->config['current'] - floor($this->config['numberOfLinks'] * $this->config['linkOffset']);
			$end = $this->config['current'] + floor($this->config['numberOfLinks'] * ( 1 - $this->config['linkOffset']));

			// 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['current'])
			{
				$start++;
				$end++;
			}

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

			// now generate the URL's for the pagination block
			for($i = $start; $i <= $end; $i++)
			{
				$urls[$i] = $this->generateUrl($i);
			}
		}

		// send the generated url's to the view
		$this->view->set('urls', $urls);

		// store the current and total pages
		$this->view->set('active', $this->config['current']);
		$this->view->set('total', $this->config['totalPages']);

		// do we need to add a first link?
		if ($this->config['showFirst'])
		{
			$this->view->set('first', $this->generateUrl(1));
		}

		if (isset($start) and $start > 1)
		{
			$this->view->set('previous', $this->generateUrl($start-1));
		}

		if (isset($end) and $end !== $this->config['totalPages'])
		{
			$this->view->set('next', $this->generateUrl($end+1));
		}

		// do we need to add a last link?
		if ($this->config['showLast'])
		{
			$this->view->set('last', $this->generateUrl($this->config['totalPages']));
		}

		$this->view->set('align', $this->config['align']);

		// return the view
		return $this->view;
	}
516482
public function render()
  {
    $html = parent::render();

    $items = '';

    // Affichage lien FIRST
    if ($this->currentPage > 1) {
      $first = $this->getElementTemplate('first');
      $first = str_replace('%page%', 1, $first);
      $items .= $first;
    }

    // Affichage previous
    if ($this->currentPage > 1) {
      $prev = $this->getElementTemplate('previous');
      $prev = str_replace('%page%', $this->currentPage - 1, $prev);
      $items .= $prev;
    }

    // Affichage des pages
    $startPage = $this->currentPage - floor($this->maxShowedPages / 2);
    $endPage   = $this->currentPage + floor($this->maxShowedPages / 2);
    if ($startPage < 1) {
      $endPage += (1 - $startPage);
      $startPage = 1;
    }
    if ($endPage > $this->nbPages) {
      $endPage = $this->nbPages;
    }
    if (($endPage - $startPage + 1) != $this->maxShowedPages) {
      $startPage = $endPage - $this->maxShowedPages + 1;
      if ($startPage < 1) {
        $startPage = 1;
      }
    }
    for ($i = $startPage; $i <= $endPage; $i++) {
      if ($this->currentPage == $i) {
        $page = $this->getElementTemplate('selectedpage');
      } else {
        $page = $this->getElementTemplate('page');
      }
      $page = str_replace('%page%', $i, $page);
      $items .= $page;
    }

    // Affichage next
    if ($this->currentPage < $this->nbPages) {
      $next = $this->getElementTemplate('next');
      $next = str_replace('%page%', $this->currentPage + 1, $next);
      $items .= $next;
    }

    // Affichage last
    if ($this->currentPage != $this->nbPages && $this->nbPages > 0) {
      $last = $this->getElementTemplate('last');
      $last = str_replace('%page%', $this->nbPages, $last);
      $items .= $last;
    }

    $html = str_replace('%items%', $items, $html);

    return $html;
  }
484860
public function render()
    {
        if ($this->getView() === null) {
            $this->setView(new TemplateView('controls/column_sorting'));
        }
        $this->getView()->mergeData([
            'order' => $this->getDirection(),
            'links' => $this->makeLinks()
        ]);
        return parent::render();
    }
17217
private function renderFooter()
    {
        if (!$this->paginator) {
            return "";
        }
        if (count($this->columns) == 0) {
            return "";
        }
        $currentpage = $this->currentpage;

        $content = '<ul class="pagination">';
        $pages = $this->getPageCount();
        if ($pages <= 1)
            return '';

        if ($currentpage - $this->firstButton > $this->maxbuttons) {

            $this->firstButton = $currentpage - $this->maxbuttons;
        }
        if ($currentpage < $this->firstButton) {
            $this->firstButton = $currentpage - 1;
        }

        if ($this->firstButton > 1) {
            $content .= "<li  class=\"page-item\"><a   class=\"page-link\"  href='void(0);' onclick=\"" . $this->getPaginatorLink(1) . "\"><span aria-hidden=\"true\">&laquo;</span></a></li>";
            $content .= "<li class=\"page-item\"><a   class=\"page-link\"  href='void(0);' onclick=\"" . $this->getPaginatorLink($currentpage - 1) . "\"><span aria-hidden=\"true\">&lsaquo;</span></a></li>";
            $content .= "<li  class=\"page-item\"><a   class=\"page-link\" href=\"javascript:void(0);\" >&hellip;</a></li>";
        }



        for ($i = $this->firstButton; $i <= $this->firstButton + $this->maxbuttons; $i++) {
            if ($i > $pages)
                break;
            if ($currentpage == $i) {
                $content .= "<li class=\"page-item active\"><a  class=\"page-link\"  href=\"javascript:void(0);\" > {$i} </a></li>";
            } else {
                $content .= "<li  class=\"page-item\"><a   class=\"page-link\" href=\"javascript:void(0);\"  onclick=\"" . $this->getPaginatorLink($i) . "\"> {$i} </a></li>";
            }
        }

        if ($pages > $this->firstButton + $this->maxbuttons) {
            $content .= "<li  class=\"page-item\" ><a   class=\"page-link\" href=\"javascript:void(0);\" >&hellip;</a></li>";
            $content .= "<li  class=\"page-item\"><a  class=\"page-link\" href='void(0);' onclick=\"" . $this->getPaginatorLink($currentpage + 1) . "\"aria-label=\"Next\">       <span aria-hidden=\"true\">&rsaquo;</span></a></li>";
            $content .= "<li  class=\"page-item\"><a  class=\"page-link\" href='void(0);' onclick=\"" . $this->getPaginatorLink($pages) . "\"aria-label=\"Next\">       <span aria-hidden=\"true\">&raquo;</span></a></li>";
        }
        
        $countall = $this->getAllRowsCount();
        $show =  $currentpage * $this->pagesize;
        if($pages ==$currentpage) $show = $countall;
        if($countall <= $this->pagesize) $show = $countall;
        
        $content = "<table  ><tr><td valign='middle'>{$show} строк с  {$countall} &nbsp;&nbsp;&nbsp;&nbsp;</td><td align='right'> {$content}</td></tr></table>";
        return "<tr ><td class=\"footercell\"  colspan=\"" . count($this->columns) . "\" >{$content}</ul></td></tr>";
    }
786265
public function render($count = 0)
    {
        $pagination = "";
        $items = $this->navigation($count);
        if ($items) foreach ($items as $page) {
            $pagination .= $this->item($page['page'], $page['url'], $page['label'], $page['class'], $page['current'], false);
        }
        
        $listPropertiesHtml = "";
        foreach ($this->options['list_properties'] as $k => $v) {
            $listPropertiesHtml .= " $k=\"$v\"";
        }
        $html = "<{$this->options['list_tag']}$listPropertiesHtml>{$pagination}</{$this->options['list_tag']}>";
        
        if ($this->options['container_tag']) {
            $containerPropertiesHtml = "";
            foreach ($this->options['container_properties'] as $k => $v) {
                $containerPropertiesHtml .= " $k=\"$v\"";
            }
            $html = "<div$containerPropertiesHtml>
                    $html
                    </div>";
        }
        
        return $html;
    }
406275
public function render()
    {
        $paginationData = $this->paginator->getPages($this->scrollingStyle);
        $unorderedList  = $this->getElement()->spawnChild('ul');
        $previous       = $unorderedList->spawnChild('li');
        $previousAnchor = $previous->spawnChild('a')->setContent('&laquo;');

        $unorderedList->setAttributes($this->getListAttributes());
        $previous->setAttributes($this->getListItemAttributes());
        $previous->addAttributes($this->getPreviousAttributes());
        $previousAnchor->setAttributes($this->getAnchorAttributes());

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

        foreach ($paginationData->pagesInRange as $page) {
            $pageNumberElement = $unorderedList->spawnChild('li');
            $pageHref          = $this->getUrl(
                $this->getRoute(),
                array_merge(
                    array('page' => $page),
                    $this->getRouteParams()
                )
            );

            $pageNumberElement->setAttributes($this->getListItemAttributes());

            if ($page === $paginationData->current) {
                $pageNumberElement->addClass('active');
            }

            $anchorElement = $pageNumberElement->spawnChild('a')->addAttribute('href', $pageHref)->setContent($page);

            $anchorElement->addAttribute('data-page', $page);
        }

        $next       = $unorderedList->spawnChild('li');
        $nextAnchor = $next->spawnChild('a')->setContent('&raquo;');

        $next->setAttributes($this->getNextAttributes());

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

        return $this->getElement()->render();
    }
213501
public function render() {

		$output = '<div id="' . esc_attr( $this->id() ) . '" data-color="' . esc_attr( $this->base_color() ) . '" data-for="' . esc_attr( $this->id() ) . '-control" class="uix-control uix-control-' . esc_attr( $this->type ) . ' ' . esc_attr( $this->id() ) . '"></div>';
		$output .= $this->label();
		$output .= $this->input();

		$output .= $this->component_templates();

		$output .= $this->modal_template();

		return $output;
	}
519038
public function render()
	{
		if ($this->filterFormFactory) {
			$this['form']['filter']->setDefaults($this->filter);
		}

		$this->template->form = $this['form'];
		$this->template->data = $this->getData();
		$this->template->columns = $this->columns;
		$this->template->editRowKey = $this->editRowKey;
		$this->template->rowPrimaryKey = $this->rowPrimaryKey;
		$this->template->paginator = $this->paginator;
		$this->template->sendOnlyRowParentSnippet = $this->sendOnlyRowParentSnippet;
		$this->template->cellsTemplates = $this->getCellsTemplates();
		$this->template->showFilterCancel = $this->filterDataSource != $this->filterDefaults; // @ intentionaly
		$this->template->setFile(__DIR__ . '/Datagrid.latte');

		$this->onRender($this);
		$this->template->render();
	}