Renders the pagination links.

@param   mixed   string of the view to use, or a Kohana_View object
@return  string  pagination output (HTML)
485672
public function render($view = null) {
            // Automatically hide pagination whenever it is superfluous
            if ($this->config['auto_hide'] === true AND $this->total_pages <= 1) {
                return '';
            }

            if ($view === null) {
                // Use the view from config
                $view = $this->config['view'];
            }
            $tpl = \Meerkat\Twig\Twig::from_template($view);

            // Pass on the whole Pagination object
            //print '<pre>';
            //print_r(get_object_vars($this));
            //print '</pre>';
            return $tpl
                ->set(get_object_vars($this))
                ->set('page', $this)
                ->render();
        }
749056
public function render($view)
    {
        if (method_exists($this, 'beforeRender')) {
            $this->beforeRender();
        }

        if (method_exists($this, 'getContext')) {
            $contextClass = $this->getContext();
            $context = new $contextClass($view, $this->data);
            $template = $this->path() . DS . 'out.mustache';
        } else {
            $template = $this->path() . DS . 'out.ctp';
        }

        if (!file_exists($template)) {
            user_error(__d('wasabi_cms', 'Template "{0}" for module {1} not found.', $template, $this->name()));
        }

        if (isset($context)) {
            if (!$this->_mustache) {
                $this->_mustache = new \Mustache_Engine();
            }
            $output = $this->_mustache->render(file_get_contents($template), $context);
        } else {
            $output = $view->element('Wasabi/Cms.module', [
                'template' => $template,
                'data' => $this->data
            ]);
        }

        return $output;
    }
388283
public function render()
    {
        if ( ! $this->hasPages()) {
            return null;
        }

        return sprintf(
            $this->wrapper,
            $this->getPreviousButton(),
            $this->getLinks(),
            $this->getNextButton()
        );
    }
1041984
public function render()
    {
        if (!$this->display) {
            return '';
        }

        Admin::script($this->script);

        return view($this->getView(), $this->variables());
    }
909569
public function render($path = 'basic', $views = null)
    {
        $view = new View();
        if (is_null($views)) {
            $views = __DIR__.'/views/';
        }

        $view->createBlade($views, $this->_config->get('cache'));

        return $view->with('pagination', [
            'currentPage' => $this->_page,
            'totalPages'  => $this->_totalPages,
            ])->render($path);
    }
1092016
function render($mode=null)
	{
        $pager_html = "<div class='pager'>";
        if ($mode === null)
        {
            if (in_array('first', $this->span_open))
            {
                $pager_html .= $this->first_page();
            }
            if (in_array('previous', $this->span_open))
            {
                $pager_html .= $this->pre_page();
            }
            $pager_html .= $this->nowbar();
            if (in_array('next', $this->span_open))
            {
                $pager_html .= $this->next_page();
            }
            if (in_array('last', $this->span_open))
            {
				$pager_html.=$this->last_page();
			}
            if (in_array('pagesize', $this->span_open))
            {
                $pager_html .= $this->set_pagesize();
            }
            $pager_html .= '</div>';
            return $pager_html;
        }
        $pager_html .= '</div>';
        return $pager_html;
	}
1210245
public function renderTableAsHtml()
    {
        $render = '';
        $tableConfig = $this->getTable()->getOptions();

        if ($tableConfig->getShowColumnFilters()) {
            $render .= $this->renderFilters();
        }

        $render .= $this->renderHead();
        $render = sprintf('<thead>%s</thead>', $render);
        $render .= $this->getTable()->getRow()->renderRows();
        $table = sprintf('<table %s>%s</table>', $this->getTable()->getAttributes(), $render);

        $view = new \Zend\View\Model\ViewModel();
        $view->setTemplate('container');

        $view->setVariable('table', $table);

        $view->setVariable('paginator', $this->renderPaginator());
        $view->setVariable('paramsWrap', $this->renderParamsWrap());
        $view->setVariable('itemCountPerPage', $this->getTable()->getParamAdapter()->getItemCountPerPage());
        $view->setVariable('quickSearch', $this->getTable()->getParamAdapter()->getQuickSearch());
        $view->setVariable('name', $tableConfig->getName());
        $view->setVariable('itemCountPerPageValues', $tableConfig->getValuesOfItemPerPage());
        $view->setVariable('showQuickSearch', $tableConfig->getShowQuickSearch());
        $view->setVariable('showPagination', $tableConfig->getShowPagination());
        $view->setVariable('showItemPerPage', $tableConfig->getShowItemPerPage());
        $view->setVariable('showExportToCSV', $tableConfig->getShowExportToCSV());

        return $this->getRenderer()->render($view);
    }
863314
function renderNav($prefix = '<span class="page_link">', $suffix = '</span>') {
        if ($this->total_rows == 0)
            return FALSE;
         
        $batch = ceil($this->page / $this->links_per_page );
        $end = $batch * $this->links_per_page;
        if ($end == $this->page) {
        //$end = $end + $this->links_per_page - 1;
        //$end = $end + ceil($this->links_per_page/2);
        }
        if ($end > $this->max_pages) {
            $end = $this->max_pages;
        }
        $start = $end - $this->links_per_page + 1;
        $links = '';
         
        for($i = $start; $i <= $end; $i ++) {
            if ($i == $this->page) {
                $links .= $prefix . " $i " . $suffix;                                       
            } else {
                $links .= " <a href='javascript:void(0);' OnClick='getdata( $i )' title='Outra página'>$i</a> ";
            }
        }
         
        return $links;
    }
493282
public function renderView() {
		$config = $this->getAppContextProperty("config");
		$globalUser = $this->getAppContextProperty("globalUser");
		$pages = $this->getAppContextProperty("pages");
		$page = $this->getAppContextProperty("page");
		$data = $this->getAppContextProperty("data");
		$app_http = $this->getAppContextProperty("app_http");
		$controllerName = $this->getAppContextProperty("controllerName");
		$systemMessages = $this->getAppContextProperty("systemMessages");
		
		include "{$this->getViewPath()}layouts/header.lo.php";
		if (!empty($this->getViewFile())) {
			$parameters = $this->getViewVariables();
			include $this->getViewFile();
		}
		include "{$this->getViewPath()}layouts/footer.lo.php";
	}
1123414
public function render()
    {
        // Run only in case paginator has at least one page
        if ($this->paginator->hasPages()) {
            $ulClass = $this->getOption('ulClass', 'pagination');
            return $this->renderList($ulClass, $this->createPaginationItems());
        }
    }
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();
    }
9679
function renderPrev($tag = '&lt;&lt;') {
        if ($this->total_rows == 0)
            return FALSE;
         
        if ($this->page > 1) {
            //return ' <a href="' . $this->php_self . '?page=' . ($this->page - 1) . '&' . $this->append . '">' . $tag . '</a>';
            $pageno = $this->page - 1;
            return " <a href='javascript:void(0);' OnClick='getdata( $pageno )' title='Anterior'>$tag</a> ";
        } else {
            return " $tag ";
        }
    }
994963
public function render($pagination, array $queryParams = array(), array $viewParams = array())
    {
        $data = $pagination->getPaginationData();

        $data['route'] = $pagination->getRoute();
        $data['query'] = array_merge($pagination->getParams(), $queryParams);

        return array_merge(
            $pagination->getPaginatorOptions(), // options given to paginator when paginated
            $pagination->getCustomParameters(), // all custom parameters for view
            $viewParams, // additional custom parameters for view
            $data // merging base route parameters last, to avoid broke of integrity
        );
    }
78852
public function _renderPagination($options) {
		if ($this->Paginator->request->params['paging'][$this->Paginator->defaultModel()]['pageCount'] < 2) {
			return '';
		}

		if (CakePlugin::loaded('TwitterBootstrap')) {
		}

		$out = array();

		$paginate = $options['paginate'];
		$prev = $paginate['prev'];
		$next = $paginate['next'];

		$this->Paginator->options($paginate['attrs']);

		$after = false !== $paginate['divOptions'] ? "\n\t" : "\n\t\t\t";
		$glue = false !== $paginate['divOptions'] ? "\n\t" : "\n\t\t\t";
		$before = '';
		if (CakePlugin::loaded('TwitterBootstrap')) {
			$glue .= "\t";
			$before .= "\n";
			$paginate['numbers']['separator'] = $after . "\t";
			// Hack for the `BootstrapPaginatorHelper::prev()` and `BootstrapPaginatorHelper::next()` to apply the correct `class`.
			$prev['options']['disabled'] = $prev['disabledOptions']['class'];
			$next['options']['disabled'] = $next['disabledOptions']['class'];
		}

		$out[] = $this->Paginator->prev($prev['title'], $prev['options'], $prev['disabledTitle'], $prev['disabledOptions']);
		$out[] = $this->Paginator->numbers($paginate['numbers']);
		$out[] = $this->Paginator->next($next['title'], $next['options'], $next['disabledTitle'], $next['disabledOptions']);

		$out = $glue . implode($glue, $out);
		if (CakePlugin::loaded('TwitterBootstrap') || CakePlugin::loaded('BoostCake')) {
			if (!isset($paginate['ulOptions'])) {
				$paginate['ulOptions'] = array('class' => 'pagination');
			}
			$out = $this->Html->tag('ul', $out . $after, $paginate['ulOptions']);
		}

		if (false !== $paginate['divOptions']) {
			return $this->Html->useTag('block', $this->_parseAttributes($paginate['divOptions']), $before . "\t" . $out . "\n");
		}

		return "\t" . $this->Html->useTag(
			'tablerow',
			$this->_parseAttributes($paginate['trOptions']),
			"\n\t\t" . $this->Html->useTag(
				'tablecell',
				$this->_parseAttributes(array_merge($paginate['tdOptions'], array('colspan' => count($options['columns'])))),
				$before . "\t\t\t" . $out . "\n\t\t"
			) . "\n\t"
		);
	}
72882
public function render($view): string
    {
        if (!($view instanceof IView)) {
            return $view;
        }

        $path = $this->resolveViewName($view->viewName());

        if ($path === null) {
            return '';
        }

        $engine = $this->resolver->resolve($path);

        return $engine->build($path, $view->viewVariables());
    }
829386
private function render() {
		$strings = implode($this->strings);
		
		// Render includes
		foreach ($this->incTemplates as $path => $include) {
			$incOutput = $include->render();
			$path = preg_replace("/\//", "\/", $path);
			$strings = preg_replace("/\{include\s$path\}/", $incOutput, $strings);
		}
		
		// Render if-statements
		foreach ($this->ifTemplates as $key => $sub) {
			foreach ($sub as $iKey => $instance) {
				$str = '';
				
				if ($this->expressions[$key]->evaluate($this->vars)) {
					$str = $instance->render();
				}
				
				$pregKey = preg_quote($key, '/');
				$strings = preg_replace("/\{if:$pregKey:$iKey\}/", $str, $strings);
			}
		}
		
		// Render foreach-loops
		foreach ($this->forTemplates as $key => $sub) {
			foreach ($sub as $iKey => $instance) {
				$tmplGen = '';
				
				if (isset($this->vars[$key]) && is_array($this->vars[$key])) {
					foreach ($this->vars[$key] as $assocArray) {
						foreach ($assocArray as $k => $v)
							$instance->set($k, $v);
						$tmplGen .= $instance->render();
					}
				}
				
				$pregKey = preg_quote($key, '/');
				$strings = preg_replace("/\{for:$pregKey:$iKey\}/", $tmplGen, $strings);
			}
		}
		
		// Render plain old variables
		foreach ($this->vars as $key => $val) {
			if (!is_array($val))
				$strings = preg_replace("/\{$key\}/", $val, $strings);
		}
		
		// Render expressions
		foreach ($this->expressions as $key => $expr) {
			$eval = $expr->evaluate($this->vars);

			// If we're an array, lets insert the number of items in the array.
			if ( is_array( $eval ) ) {
				$eval = count( $eval );
			}

			$pregKey = preg_quote($key, '/');
			
			$strings = preg_replace('/\{'.$pregKey.'\}/', $eval, $strings);
		}
		
		$strings = preg_replace("/\\\{/", '{', $strings);
		$strings = preg_replace("/\\\}/", '}', $strings);

		return $strings;
	}
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()
        );
    }