Debian Codegraph @

includes/linker/Hook/LinkerGenerateRollbackLinkHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Linker\Hook;
4
5 use MediaWiki\Context\IContextSource;
6 use MediaWiki\Linker\Linker;
7 use MediaWiki\Revision\RevisionRecord;
8
9 /**
10 * @stable to implement
11 * @ingroup Hooks
12 */
13 interface LinkerGenerateRollbackLinkHook {
14 /**
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.
17 *
18 * The call to this hook is made after all checks, so the rollback should be valid.
19 *
20 * @see Linker::generateRollback()
21 * @since 1.36
22 *
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
28 */
29 public function onLinkerGenerateRollbackLink( $revRecord, $context, $options, &$inner );
30 }