aboutsummaryrefslogtreecommitdiffstats
path: root/includes/Storage/Hook/ParserOutputStashForEditHook.php
blob: f64dfa0811cb6fb3a6f15006784261d17e3f95d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php

namespace MediaWiki\Storage\Hook;

use MediaWiki\Content\Content;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\User\User;
use WikiPage;

/**
 * This is a hook handler interface, see docs/Hooks.md.
 * Use the hook name "ParserOutputStashForEdit" to register handlers implementing this interface.
 *
 * @stable to implement
 * @ingroup Hooks
 */
interface ParserOutputStashForEditHook {
	/**
	 * This hook is called when an edit stash parse finishes, before the
	 * output is cached.
	 *
	 * @since 1.35
	 *
	 * @param WikiPage $page WikiPage of the candidate edit
	 * @param Content $content Content object of the candidate edit
	 * @param ParserOutput $output ParserOutput result of the candidate edit
	 * @param string $summary Change summary of the candidate edit
	 * @param User $user User considering the edit
	 * @return bool|void True or no return value to continue or false to abort
	 */
	public function onParserOutputStashForEdit( $page, $content, $output, $summary,
		$user
	);
}