MediaWiki REL1_34
MediaWiki\Navigation\PrevNextNavigationRenderer Class Reference

Helper class for generating prev/next links for paging. More...

Collaboration diagram for MediaWiki\Navigation\PrevNextNavigationRenderer:

Public Member Functions

 __construct (MessageLocalizer $messageLocalizer)
 
 buildPrevNextNavigation (Title $title, $offset, $limit, array $query=[], $atend=false)
 Generate (prev x| next x) (20|50|100...) type links for paging.
 

Private Member Functions

 numLink (Title $title, $offset, $limit, array $query, $link, $tooltipMsg, $class)
 Helper function for buildPrevNextNavigation() that generates links.
 

Private Attributes

MessageLocalizer $messageLocalizer
 

Detailed Description

Helper class for generating prev/next links for paging.

Todo:
Use LinkTarget instead of Title
Since
1.34

Definition at line 33 of file PrevNextNavigationRenderer.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Navigation\PrevNextNavigationRenderer::__construct ( MessageLocalizer  $messageLocalizer)

Member Function Documentation

◆ buildPrevNextNavigation()

MediaWiki\Navigation\PrevNextNavigationRenderer::buildPrevNextNavigation ( Title  $title,
  $offset,
  $limit,
array  $query = [],
  $atend = false 
)

Generate (prev x| next x) (20|50|100...) type links for paging.

Parameters
Title$titleTitle object to link
int$offset
int$limit
array$queryOptional URL query parameter string
bool$atendOptional param for specified if this is the last page
Returns
string

Definition at line 57 of file PrevNextNavigationRenderer.php.

References $lang, $title, and MediaWiki\Navigation\PrevNextNavigationRenderer\numLink().

◆ numLink()

MediaWiki\Navigation\PrevNextNavigationRenderer::numLink ( Title  $title,
  $offset,
  $limit,
array  $query,
  $link,
  $tooltipMsg,
  $class 
)
private

Helper function for buildPrevNextNavigation() that generates links.

Parameters
Title$titleTitle object to link
int$offset
int$limit
array$queryExtra query parameters
string$linkText to use for the link; will be escaped
string$tooltipMsgName of the message to use as tooltip
string$classValue of the "class" attribute of the link
Returns
string HTML fragment

Definition at line 111 of file PrevNextNavigationRenderer.php.

References $title.

Referenced by MediaWiki\Navigation\PrevNextNavigationRenderer\buildPrevNextNavigation().

Member Data Documentation

◆ $messageLocalizer

MessageLocalizer MediaWiki\Navigation\PrevNextNavigationRenderer::$messageLocalizer
private

The documentation for this class was generated from the following file: