/** * Paginator Widget * * @param array $options Options * @return string Markup */ public function numbers(array $options = []) { $options = Hash::merge(['first' => 1, 'last' => 1], $options); parent::templates(['ellipsis' => '<li class="disabled"><a>...</a></li>']); $pagination = ''; $pagination .= parent::prev('«', ['escape' => false]); $pagination .= parent::numbers($options); $pagination .= parent::next('»', ['escape' => false]); $counter = parent::counter(['format' => '{{count}} Einträge']); $ret = sprintf('<nav><ul class="pagination">%s<li class="counter"><a>%s</a></li></ul></nav>', $pagination, $counter); return $ret; }
/** * Generates a "next" link for a set of paged records * @param string $title Title for the link * @param array $options Options for pagination link * @return string A "next" link or a disabled link */ public function next($title = 'Next >>', array $options = []) { $options = $this->optionsDefaults(['escape' => false, 'icon-align' => 'right'], $options); list($title, $options) = $this->addIconToText($title, $options); return parent::next($title, $options); }