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. More...
 
 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)
 
 setMakeLinkCallback (?callable $callback)
 
 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 > $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 19 of file PagerNavigationBuilder.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 73 of file PagerNavigationBuilder.php.

Member Function Documentation

◆ getHtml()

MediaWiki\Navigation\PagerNavigationBuilder::getHtml ( )

Get the navigation HTML.

Returns
string HTML

Definition at line 305 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 270 of file PagerNavigationBuilder.php.

References $type.

◆ setCurrentLimit()

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

Definition at line 207 of file PagerNavigationBuilder.php.

◆ setFirstLinkQuery()

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

Definition at line 153 of file PagerNavigationBuilder.php.

◆ setFirstMsg()

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

Definition at line 162 of file PagerNavigationBuilder.php.

◆ setFirstTooltipMsg()

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

Definition at line 171 of file PagerNavigationBuilder.php.

◆ setLastLinkQuery()

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

Definition at line 180 of file PagerNavigationBuilder.php.

◆ setLastMsg()

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

Definition at line 189 of file PagerNavigationBuilder.php.

◆ setLastTooltipMsg()

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

Definition at line 198 of file PagerNavigationBuilder.php.

◆ setLimitLinkQueryParam()

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

Definition at line 225 of file PagerNavigationBuilder.php.

◆ setLimits()

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

Definition at line 216 of file PagerNavigationBuilder.php.

◆ setLimitTooltipMsg()

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

Definition at line 234 of file PagerNavigationBuilder.php.

◆ setLinkQuery()

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

Definition at line 90 of file PagerNavigationBuilder.php.

◆ setMakeLinkCallback()

MediaWiki\Navigation\PagerNavigationBuilder::setMakeLinkCallback ( ?callable  $callback)
Deprecated:
since 1.39
Parameters
callable | null$callbackFunction to call instead of makeLink(). See IndexPager::makeLink() for the expected signature.
Returns
$this

Definition at line 245 of file PagerNavigationBuilder.php.

◆ setNextLinkQuery()

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

Definition at line 126 of file PagerNavigationBuilder.php.

◆ setNextMsg()

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

Definition at line 135 of file PagerNavigationBuilder.php.

◆ setNextTooltipMsg()

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

Definition at line 144 of file PagerNavigationBuilder.php.

◆ setPage()

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

Definition at line 81 of file PagerNavigationBuilder.php.

◆ setPrevLinkQuery()

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

Definition at line 99 of file PagerNavigationBuilder.php.

◆ setPrevMsg()

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

Definition at line 108 of file PagerNavigationBuilder.php.

◆ setPrevTooltipMsg()

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

Definition at line 117 of file PagerNavigationBuilder.php.

Member Data Documentation

◆ $linkQuery

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

Definition at line 26 of file PagerNavigationBuilder.php.

◆ $page

PageReference MediaWiki\Navigation\PagerNavigationBuilder::$page
protected

Definition at line 24 of file PagerNavigationBuilder.php.


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