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 "DifferenceEngineOldHeader" to register handlers implementing this interface. |
10 | * |
11 | * @stable to implement |
12 | * @ingroup Hooks |
13 | */ |
14 | interface DifferenceEngineOldHeaderHook { |
15 | /** |
16 | * Use this hook to change the $oldHeader variable, which contains information about |
17 | * the old 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 &$oldHeader 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 string $prevlink String containing the link to the previous revision (if any); also |
26 | * included in $oldHeader |
27 | * @param string $oldminor String indicating if the old revision was marked as a minor edit |
28 | * @param bool $diffOnly Boolean parameter passed to DifferenceEngine#showDiffPage, indicating |
29 | * whether we should show just the diff; passed in as a query string parameter to |
30 | * the various URLs constructed here (i.e. $prevlink) |
31 | * @param string $ldel RevisionDelete link for the old revision, if the current user is allowed |
32 | * to use the RevisionDelete feature |
33 | * @param bool $unhide Boolean parameter indicating whether to show RevisionDeleted revisions |
34 | * @return bool|void True or no return value to continue or false to abort |
35 | */ |
36 | public function onDifferenceEngineOldHeader( $differenceEngine, &$oldHeader, |
37 | $prevlink, $oldminor, $diffOnly, $ldel, $unhide |
38 | ); |
39 | } |