64 # Make 'previous' link
65 $prev = $this->messageLocalizer->msg(
'prevn' )->title(
$title )
66 ->numParams( $limit )->text();
69 $plink = $this->
numLink( $title, max( $offset - $limit, 0 ), $limit, $query,
70 $prev,
'prevn-title',
'mw-prevlink' );
72 $plink = htmlspecialchars( $prev );
76 $next = $this->messageLocalizer->msg(
'nextn' )->title(
$title )
77 ->numParams( $limit )->text();
79 $nlink = htmlspecialchars( $next );
81 $nlink = $this->
numLink( $title, $offset + $limit, $limit,
82 $query, $next,
'nextn-title',
'mw-nextlink' );
85 # Make links to set number of items per page
89 $lang = $this->messageLocalizer->getLanguage();
90 foreach ( [ 20, 50, 100, 250, 500 ] as $num ) {
91 $numLinks[] = $this->
numLink( $title, $offset, $num, $query,
92 $lang->formatNum( $num ),
'shown-title',
'mw-numlink' );
95 return $this->messageLocalizer->msg(
'viewprevnext' )->title(
$title
96 )->rawParams( $plink, $nlink,
$lang->pipeList( $numLinks ) )->escaped();