MediaWiki master
MediaWiki\Navigation\PagerNavigationBuilder Class Reference

Build the navigation for a pager, with links to prev/next page, links to change limits, and optionally links to first/last page. More...

Collaboration diagram for MediaWiki\Navigation\PagerNavigationBuilder:

Public Member Functions

 __construct (MessageLocalizer $messageLocalizer)
 
 getHtml ()
 Get the navigation HTML.
 
 setCurrentLimit (int $currentLimit)
 
 setFirstLinkQuery (?array $firstLinkQuery)
 
 setFirstMsg (?string $firstMsg)
 
 setFirstTooltipMsg (?string $firstTooltipMsg)
 
 setLastLinkQuery (?array $lastLinkQuery)
 
 setLastMsg (?string $lastMsg)
 
 setLastTooltipMsg (?string $lastTooltipMsg)
 
 setLimitLinkQueryParam (string $limitLinkQueryParam)
 
 setLimits (array $limits)
 
 setLimitTooltipMsg (?string $limitTooltipMsg)
 
 setLinkQuery (array $linkQuery)
 
 setNextLinkQuery (?array $nextLinkQuery)
 
 setNextMsg (string $nextMsg)
 
 setNextTooltipMsg (?string $nextTooltipMsg)
 
 setPage (PageReference $page)
 
 setPrevLinkQuery (?array $prevLinkQuery)
 
 setPrevMsg (string $prevMsg)
 
 setPrevTooltipMsg (?string $prevTooltipMsg)
 

Protected Member Functions

 makeLink (?array $query, ?string $class, string $text, ?string $tooltip, ?string $rel=null)
 

Protected Attributes

array< string, string|int|null > $linkQuery = []
 
PageReference $page
 

Detailed Description

Build the navigation for a pager, with links to prev/next page, links to change limits, and optionally links to first/last page.

Since
1.39

Definition at line 21 of file PagerNavigationBuilder.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Navigation\PagerNavigationBuilder::__construct ( MessageLocalizer $messageLocalizer)
Parameters
MessageLocalizer$messageLocalizer

Definition at line 70 of file PagerNavigationBuilder.php.

Member Function Documentation

◆ getHtml()

MediaWiki\Navigation\PagerNavigationBuilder::getHtml ( )

Get the navigation HTML.

Returns
string HTML

Definition at line 289 of file PagerNavigationBuilder.php.

◆ makeLink()

MediaWiki\Navigation\PagerNavigationBuilder::makeLink ( ?array $query,
?string $class,
string $text,
?string $tooltip,
?string $rel = null )
protected
Stability: stable
to override
Parameters
array | null$query
string | null$class
string$text
string | null$tooltip
string | null$rel
Returns
string HTML

Definition at line 259 of file PagerNavigationBuilder.php.

◆ setCurrentLimit()

MediaWiki\Navigation\PagerNavigationBuilder::setCurrentLimit ( int $currentLimit)
Parameters
int$currentLimit
Returns
$this

Definition at line 204 of file PagerNavigationBuilder.php.

◆ setFirstLinkQuery()

MediaWiki\Navigation\PagerNavigationBuilder::setFirstLinkQuery ( ?array $firstLinkQuery)
Parameters
array<string,string|int|null>|null$firstLinkQuery
Returns
$this

Definition at line 150 of file PagerNavigationBuilder.php.

◆ setFirstMsg()

MediaWiki\Navigation\PagerNavigationBuilder::setFirstMsg ( ?string $firstMsg)
Parameters
string | null$firstMsg
Returns
$this

Definition at line 159 of file PagerNavigationBuilder.php.

◆ setFirstTooltipMsg()

MediaWiki\Navigation\PagerNavigationBuilder::setFirstTooltipMsg ( ?string $firstTooltipMsg)
Parameters
string | null$firstTooltipMsg
Returns
$this

Definition at line 168 of file PagerNavigationBuilder.php.

◆ setLastLinkQuery()

MediaWiki\Navigation\PagerNavigationBuilder::setLastLinkQuery ( ?array $lastLinkQuery)
Parameters
array<string,string|int|null>|null$lastLinkQuery
Returns
$this

Definition at line 177 of file PagerNavigationBuilder.php.

◆ setLastMsg()

MediaWiki\Navigation\PagerNavigationBuilder::setLastMsg ( ?string $lastMsg)
Parameters
string | null$lastMsg
Returns
$this

Definition at line 186 of file PagerNavigationBuilder.php.

◆ setLastTooltipMsg()

MediaWiki\Navigation\PagerNavigationBuilder::setLastTooltipMsg ( ?string $lastTooltipMsg)
Parameters
string | null$lastTooltipMsg
Returns
$this

Definition at line 195 of file PagerNavigationBuilder.php.

◆ setLimitLinkQueryParam()

MediaWiki\Navigation\PagerNavigationBuilder::setLimitLinkQueryParam ( string $limitLinkQueryParam)
Parameters
string$limitLinkQueryParam
Returns
$this

Definition at line 222 of file PagerNavigationBuilder.php.

◆ setLimits()

MediaWiki\Navigation\PagerNavigationBuilder::setLimits ( array $limits)
Parameters
int[]$limits
Returns
$this

Definition at line 213 of file PagerNavigationBuilder.php.

◆ setLimitTooltipMsg()

MediaWiki\Navigation\PagerNavigationBuilder::setLimitTooltipMsg ( ?string $limitTooltipMsg)
Parameters
string | null$limitTooltipMsg
Returns
$this

Definition at line 231 of file PagerNavigationBuilder.php.

◆ setLinkQuery()

MediaWiki\Navigation\PagerNavigationBuilder::setLinkQuery ( array $linkQuery)
Parameters
array<string,string|int|null>$linkQuery
Returns
$this

Definition at line 87 of file PagerNavigationBuilder.php.

◆ setNextLinkQuery()

MediaWiki\Navigation\PagerNavigationBuilder::setNextLinkQuery ( ?array $nextLinkQuery)
Parameters
array<string,string|int|null>|null$nextLinkQuery
Returns
$this

Definition at line 123 of file PagerNavigationBuilder.php.

◆ setNextMsg()

MediaWiki\Navigation\PagerNavigationBuilder::setNextMsg ( string $nextMsg)
Parameters
string$nextMsg
Returns
$this

Definition at line 132 of file PagerNavigationBuilder.php.

◆ setNextTooltipMsg()

MediaWiki\Navigation\PagerNavigationBuilder::setNextTooltipMsg ( ?string $nextTooltipMsg)
Parameters
string | null$nextTooltipMsg
Returns
$this

Definition at line 141 of file PagerNavigationBuilder.php.

◆ setPage()

MediaWiki\Navigation\PagerNavigationBuilder::setPage ( PageReference $page)
Parameters
PageReference$page
Returns
$this

Definition at line 78 of file PagerNavigationBuilder.php.

◆ setPrevLinkQuery()

MediaWiki\Navigation\PagerNavigationBuilder::setPrevLinkQuery ( ?array $prevLinkQuery)
Parameters
array<string,string|int|null>|null$prevLinkQuery
Returns
$this

Definition at line 96 of file PagerNavigationBuilder.php.

◆ setPrevMsg()

MediaWiki\Navigation\PagerNavigationBuilder::setPrevMsg ( string $prevMsg)
Parameters
string$prevMsg
Returns
$this

Definition at line 105 of file PagerNavigationBuilder.php.

◆ setPrevTooltipMsg()

MediaWiki\Navigation\PagerNavigationBuilder::setPrevTooltipMsg ( ?string $prevTooltipMsg)
Parameters
string | null$prevTooltipMsg
Returns
$this

Definition at line 114 of file PagerNavigationBuilder.php.

Member Data Documentation

◆ $linkQuery

array<string,string|int|null> MediaWiki\Navigation\PagerNavigationBuilder::$linkQuery = []
protected

Definition at line 28 of file PagerNavigationBuilder.php.

◆ $page

PageReference MediaWiki\Navigation\PagerNavigationBuilder::$page
protected

Definition at line 26 of file PagerNavigationBuilder.php.


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