MediaWiki  master
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. More...
 shouldPreventClickjacking ()
 toHTML ()

Detailed Description

Generate a set of tools for a revision.


Definition at line 14 of file PagerTools.php.

Constructor & Destructor Documentation

◆ __construct()

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 performs permission checks where necessary.

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?
PageIdentity$titleThe page to generate tools for. It is the caller's responsibility to ensure that the page is already in the link cache.

Definition at line 33 of file PagerTools.php.

References $title, 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()

PagerTools::shouldPreventClickjacking ( )

Definition at line 93 of file PagerTools.php.

◆ toHTML()

PagerTools::toHTML ( )

Definition at line 97 of file PagerTools.php.

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