| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Storage\Hook; |
| 4 | |
| 5 | use MediaWiki\Content\Content; |
| 6 | use MediaWiki\Parser\ParserOutput; |
| 7 | use MediaWiki\User\User; |
| 8 | use WikiPage; |
| 9 | |
| 10 | /** |
| 11 | * This is a hook handler interface, see docs/Hooks.md. |
| 12 | * Use the hook name "ParserOutputStashForEdit" to register handlers implementing this interface. |
| 13 | * |
| 14 | * @stable to implement |
| 15 | * @ingroup Hooks |
| 16 | */ |
| 17 | interface ParserOutputStashForEditHook { |
| 18 | /** |
| 19 | * This hook is called when an edit stash parse finishes, before the |
| 20 | * output is cached. |
| 21 | * |
| 22 | * @since 1.35 |
| 23 | * |
| 24 | * @param WikiPage $page WikiPage of the candidate edit |
| 25 | * @param Content $content Content object of the candidate edit |
| 26 | * @param ParserOutput $output ParserOutput result of the candidate edit |
| 27 | * @param string $summary Change summary of the candidate edit |
| 28 | * @param User $user User considering the edit |
| 29 | * @return bool|void True or no return value to continue or false to abort |
| 30 | */ |
| 31 | public function onParserOutputStashForEdit( $page, $content, $output, $summary, |
| 32 | $user |
| 33 | ); |
| 34 | } |