| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | use MediaWiki\EditPage\EditPage; |
| 6 | use MediaWiki\Output\OutputPage; |
| 7 | |
| 8 | /** |
| 9 | * This is a hook handler interface, see docs/Hooks.md. |
| 10 | * Use the hook name "EditPageBeforeConflictDiff" to register handlers implementing this interface. |
| 11 | * |
| 12 | * @stable to implement |
| 13 | * @ingroup Hooks |
| 14 | */ |
| 15 | interface EditPageBeforeConflictDiffHook { |
| 16 | /** |
| 17 | * Use this hook to modify the EditPage object and output when there's an edit conflict. |
| 18 | * |
| 19 | * @since 1.35 |
| 20 | * |
| 21 | * @param EditPage $editor |
| 22 | * @param OutputPage $out |
| 23 | * @return bool|void True or no return value to continue. False to halt normal diff output; |
| 24 | * in this case you're responsible for computing and outputting the entire "conflict" part, |
| 25 | * i.e., the "difference between revisions" and "your text" headers and sections. |
| 26 | */ |
| 27 | public function onEditPageBeforeConflictDiff( $editor, $out ); |
| 28 | } |