MediaWiki master
MediaWiki\Pager\PagerTools Class Reference

Generate a set of tools for a revision. More...

Public Member Functions

 __construct (RevisionRecord $revRecord, ?RevisionRecord $previousRevRecord, bool $showRollbackLink, HookRunner $hookRunner, PageIdentity $title, IContextSource $context, LinkRenderer $linkRenderer)
 Generate a set of tools for a revision.
 
 shouldPreventClickjacking ()
 
 toHTML ()
 

Detailed Description

Generate a set of tools for a revision.

Since
1.40

Definition at line 17 of file PagerTools.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Pager\PagerTools::__construct ( RevisionRecord $revRecord,
?RevisionRecord $previousRevRecord,
bool $showRollbackLink,
HookRunner $hookRunner,
PageIdentity $title,
IContextSource $context,
LinkRenderer $linkRenderer )

Generate a set of tools for a revision.

Will perform permission checks where necessary.

Parameters
RevisionRecord$revRecordThe revision to generate tools for.
RevisionRecord | null$previousRevRecordThe previous revision (if any). Optional. Used to produce undo links.
bool$showRollbackLinkWhether to show the rollback link. Only set to true if the revision is the latest revision of its page and it has a parent. FIXME why don't we do these checks ourselves?
HookRunner$hookRunner
PageIdentity$titleThe page to generate tools for. It is the caller's responsibility to ensure that the page is already in the link cache.
IContextSource$context
LinkRenderer$linkRenderer

Definition at line 36 of file PagerTools.php.

References MediaWiki\Context\IContextSource\getAuthority(), MediaWiki\Revision\RevisionRecord\getId(), MediaWiki\Revision\RevisionRecord\getUser(), MediaWiki\Revision\RevisionRecord\isDeleted(), MediaWiki\Linker\LinkRenderer\makeKnownLink(), MessageLocalizer\msg(), and MediaWiki\HookContainer\HookRunner\onHistoryTools().

Member Function Documentation

◆ shouldPreventClickjacking()

MediaWiki\Pager\PagerTools::shouldPreventClickjacking ( )

Definition at line 96 of file PagerTools.php.

◆ toHTML()

MediaWiki\Pager\PagerTools::toHTML ( )

Definition at line 100 of file PagerTools.php.


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