MediaWiki REL1_37
MediaWiki\Diff\Hook\DifferenceEngineNewHeaderHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inheritance diagram for MediaWiki\Diff\Hook\DifferenceEngineNewHeaderHook:

Public Member Functions

 onDifferenceEngineNewHeader ( $differenceEngine, &$newHeader, $formattedRevisionTools, $nextlink, $rollback, $newminor, $diffOnly, $rdel, $unhide)
 Use this hook to change the $newHeader variable, which contains information about the new revision, such as the revision's author, whether the revision was marked as a minor edit or not, etc.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "DifferenceEngineNewHeader" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 14 of file DifferenceEngineNewHeaderHook.php.

Member Function Documentation

◆ onDifferenceEngineNewHeader()

MediaWiki\Diff\Hook\DifferenceEngineNewHeaderHook::onDifferenceEngineNewHeader (   $differenceEngine,
$newHeader,
  $formattedRevisionTools,
  $nextlink,
  $rollback,
  $newminor,
  $diffOnly,
  $rdel,
  $unhide 
)

Use this hook to change the $newHeader variable, which contains information about the new revision, such as the revision's author, whether the revision was marked as a minor edit or not, etc.

Since
1.35
Parameters
DifferenceEngine$differenceEngine
string&$newHeaderString containing the various #mw-diff-otitle[1-5] divs, which include things like revision author info, revision comment, RevisionDelete link and more
array$formattedRevisionToolsArray containing revision tools, some of which may have been injected with the DiffTools hook
string$nextlinkString containing the link to the next revision (if any); also included in $newHeader
string$rollbackRollback link to roll this revision back to the previous one, if any
string$newminorString indicating if the new revision was marked as a minor edit
bool$diffOnlyBoolean parameter passed to DifferenceEngine::showDiffPage, indicating whether we should show just the diff; passed in as a query string parameter to the various URLs constructed here (i.e. $nextlink)
string$rdelRevisionDelete link for the new revision, if the current user is allowed to use the RevisionDelete feature
bool$unhideBoolean parameter indicating whether to show RevisionDeleted revisions
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


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