Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Diff\Hook; |
4 | |
5 | use DifferenceEngine; |
6 | |
7 | /** |
8 | * This is a hook handler interface, see docs/Hooks.md. |
9 | * Use the hook name "DifferenceEngineNewHeader" to register handlers implementing this interface. |
10 | * |
11 | * @stable to implement |
12 | * @ingroup Hooks |
13 | */ |
14 | interface DifferenceEngineNewHeaderHook { |
15 | /** |
16 | * Use this hook to change the $newHeader variable, which contains information about |
17 | * the new revision, such as the revision's author, whether the revision was marked |
18 | * as a minor edit or not, etc. |
19 | * |
20 | * @since 1.35 |
21 | * |
22 | * @param DifferenceEngine $differenceEngine |
23 | * @param string &$newHeader String containing the various #mw-diff-otitle[1-5] divs, which |
24 | * include things like revision author info, revision comment, RevisionDelete link and more |
25 | * @param array $formattedRevisionTools Array containing revision tools, some of which may have |
26 | * been injected with the DiffTools hook |
27 | * @param string $nextlink String containing the link to the next revision (if any); also |
28 | * included in $newHeader |
29 | * @param string $rollback Rollback link to roll this revision back to the previous one, if any |
30 | * @param string $newminor String indicating if the new revision was marked as a minor edit |
31 | * @param bool $diffOnly Boolean parameter passed to DifferenceEngine#showDiffPage, indicating |
32 | * whether we should show just the diff; passed in as a query string parameter to |
33 | * the various URLs constructed here (i.e. $nextlink) |
34 | * @param string $rdel RevisionDelete link for the new revision, if the current user is allowed |
35 | * to use the RevisionDelete feature |
36 | * @param bool $unhide Boolean parameter indicating whether to show RevisionDeleted revisions |
37 | * @return bool|void True or no return value to continue or false to abort |
38 | */ |
39 | public function onDifferenceEngineNewHeader( $differenceEngine, &$newHeader, |
40 | $formattedRevisionTools, $nextlink, $rollback, $newminor, $diffOnly, $rdel, |
41 | $unhide |
42 | ); |
43 | } |