code/template/helper/paginator.php
public function page(ObjectConfigInterface $page, HttpUrlInterface $url)
    {
        $page->append(array(
            'title'   => '',
            'current' => false,
            'active'  => false,
            'offset'  => 0,
            'limit'   => 0,
            'rel'      => '',
            'attribs'  => array(),
        ));

        //Set the offset and limit
        $url->query['limit']  = $page->limit;
        $url->query['offset'] = $page->offset;

        $link_attribs = [];

        if (!empty($page->rel)) {
            $link_attribs['rel'] = $page->rel;
        }

        if ($page->active && !$page->current) {
            $link_attribs['href'] = (string)$url;
        }

        $html = '<a '.$this->buildAttributes($link_attribs).'>'.$this->getObject('translator')->translate($page->title).'</a>';

        return $html;
    }
public function page(ObjectConfigInterface $page, HttpUrlInterface $url)
    {
        $page->append(array(
            'title'   => '',
            'current' => false,
            'active'  => false,
            'offset'  => 0,
            'limit'   => 0,
            'rel'      => '',
            'attribs'  => array(),
        ));

        //Set the offset and limit
        $url->query['limit']  = $page->limit;
        $url->query['offset'] = $page->offset;

        $link_attribs = [];

        if (!empty($page->rel)) {
            $link_attribs['rel'] = $page->rel;
        }

        if ($page->active && !$page->current) {
            $link_attribs['href'] = (string)$url;
        }

        $html = '<a '.$this->buildAttributes($link_attribs).'>'.$this->getObject('translator')->translate($page->title).'</a>';

        return $html;
    }
public function page ( ObjectConfigInterface $ page , HttpUrlInterface $ url ) { $ page -> append ( array ( 'title' => '' , 'current' => false , 'active' => false , 'offset' => 0 , 'limit' => 0 , 'rel' => '' , 'attribs' => array ( ) , ) ) ; //Set the offset and limit $ url -> query [ 'limit' ] = $ page -> limit ; $ url -> query [ 'offset' ] = $ page -> offset ; $ link_attribs = [ ] ; if ( ! empty ( $ page -> rel ) ) { $ link_attribs [ 'rel' ] = $ page -> rel ; } if ( $ page -> active && ! $ page -> current ) { $ link_attribs [ 'href' ] = ( string ) $ url ; } $ html = '<a ' . $ this -> buildAttributes ( $ link_attribs ) . '>' . $ this -> getObject ( 'translator' ) -> translate ( $ page -> title ) . '</a>' ; return $ html ; }
Render a page link

@param   ObjectConfigInterface  $page The page data
@param   HttpUrlInterface       $url  The base url to create the link
@return  string  Html
Render a page link