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
3namespace MediaWiki\Hook;
4
5use Content;
6use MediaWiki\EditPage\EditPage;
7use 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 */
16interface 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}