Debian Codegraph @

includes/Hook/AlternateEditPreviewHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Hook;
4
5 use MediaWiki\Content\Content;
6 use MediaWiki\EditPage\EditPage;
7 use MediaWiki\Parser\ParserOutput;
8
9 /**
10 * This is a hook handler interface, see docs/Hooks.md.
11 * Use the hook name "AlternateEditPreview" to register handlers implementing this interface.
12 *
13 * @stable to implement
14 * @ingroup Hooks
15 */
16 interface AlternateEditPreviewHook {
17 /**
18 * This hook is called before generating the preview of the page when editing
19 * ( EditPage::getPreviewText() ).
20 *
21 * @since 1.35
22 *
23 * @param EditPage $editPage
24 * @param Content &$content Content object for the text field from the edit page
25 * @param string &$previewHTML Text to be placed into the page for the preview
26 * @param ParserOutput &$parserOutput ParserOutput object for the preview
27 * @return bool|void True or no return value to continue, or false and set $previewHTML and
28 * $parserOutput to output custom page preview HTML
29 */
30 public function onAlternateEditPreview( $editPage, &$content, &$previewHTML,
31 &$parserOutput
32 );
33 }