| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Storage\Hook; |
| 4 | |
| 5 | use MediaWiki\Revision\RevisionRecord; |
| 6 | use MediaWiki\Storage\EditResult; |
| 7 | use MediaWiki\User\UserIdentity; |
| 8 | use WikiPage; |
| 9 | |
| 10 | /** |
| 11 | * This is a hook handler interface, see docs/Hooks.md. |
| 12 | * Use the hook name "PageSaveComplete" to register handlers implementing this interface. |
| 13 | * |
| 14 | * @stable to implement |
| 15 | * @ingroup Hooks |
| 16 | */ |
| 17 | interface PageSaveCompleteHook { |
| 18 | /** |
| 19 | * This hook is called after an article has been updated. |
| 20 | * |
| 21 | * @since 1.35 |
| 22 | * |
| 23 | * @param WikiPage $wikiPage WikiPage modified |
| 24 | * @param UserIdentity $user User performing the modification |
| 25 | * @param string $summary Edit summary/comment |
| 26 | * @param int $flags Flags passed to WikiPage::doUserEditContent() |
| 27 | * @param RevisionRecord $revisionRecord New RevisionRecord of the article |
| 28 | * @param EditResult $editResult Object storing information about the effects of this edit, |
| 29 | * including which edits were reverted and which edit is this based on (for reverts and null |
| 30 | * edits). |
| 31 | * @return bool|void True or no return value to continue or false to stop other hook handlers |
| 32 | * from being called; save cannot be aborted |
| 33 | */ |
| 34 | public function onPageSaveComplete( |
| 35 | $wikiPage, |
| 36 | $user, |
| 37 | $summary, |
| 38 | $flags, |
| 39 | $revisionRecord, |
| 40 | $editResult |
| 41 | ); |
| 42 | } |