3 namespace MediaWiki\Linker\Hook
;
5 use MediaWiki\Context\IContextSource
;
6 use MediaWiki\Linker\Linker
;
7 use MediaWiki\Revision\RevisionRecord
;
10 * @stable to implement
13 interface LinkerGenerateRollbackLinkHook
{
15 * This hook is called before a rollback link is displayed to allow for customizing the
16 * appearance of the link or substituting it with something entirely different.
18 * The call to this hook is made after all checks, so the rollback should be valid.
20 * @see Linker::generateRollback()
23 * @param RevisionRecord $revRecord The top RevisionRecord that is being rolled back
24 * @param IContextSource $context The context source provided to the method
25 * @param array $options Array of options for the Linker::generateRollback() method
26 * @param string &$inner HTML of the rollback link
27 * @return bool|void True or no return value to continue or false to abort
29 public function onLinkerGenerateRollbackLink( $revRecord, $context, $options, &$inner );