Debian Codegraph @

includes/page/Hook/ArticleRevisionViewCustomHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Page\Hook;
4
5 use MediaWiki\Output\OutputPage;
6 use MediaWiki\Revision\RevisionRecord;
7 use MediaWiki\Title\Title;
8
9 /**
10 * This is a hook handler interface, see docs/Hooks.md.
11 * Use the hook name "ArticleRevisionViewCustom" to register handlers implementing this interface.
12 *
13 * @stable to implement
14 * @ingroup Hooks
15 */
16 interface ArticleRevisionViewCustomHook {
17 /**
18 * Use this hook for custom rendering of an article's content.
19 * Note that it is preferable to implement proper handing for a custom data type using
20 * the ContentHandler facility.
21 *
22 * @since 1.35
23 *
24 * @param RevisionRecord|null $revision Content of the page (or null if the revision
25 * could not be loaded). May also be a fake that wraps content supplied by an extension.
26 * @param Title $title Title of the page
27 * @param int $oldid Requested revision ID, or 0 for the current revision
28 * @param OutputPage $output
29 * @return bool|void True or no return value to continue or false to abort
30 */
31 public function onArticleRevisionViewCustom( $revision, $title, $oldid,
32 $output
33 );
34 }