| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | use MediaWiki\Status\Status; |
| 6 | use MediaWiki\Title\Title; |
| 7 | use MediaWiki\User\User; |
| 8 | |
| 9 | /** |
| 10 | * This is a hook handler interface, see docs/Hooks.md. |
| 11 | * Use the hook name "MovePageCheckPermissions" to register handlers implementing this interface. |
| 12 | * |
| 13 | * @stable to implement |
| 14 | * @ingroup Hooks |
| 15 | */ |
| 16 | interface MovePageCheckPermissionsHook { |
| 17 | /** |
| 18 | * Use this hook to specify whether the user is allowed to move the page. |
| 19 | * |
| 20 | * @since 1.35 |
| 21 | * |
| 22 | * @param Title $oldTitle Current (old) location |
| 23 | * @param Title $newTitle New location |
| 24 | * @param User $user User making the move |
| 25 | * @param string|null $reason Reason provided by the user |
| 26 | * @param Status $status Status object to pass error messages to |
| 27 | * @return bool|void True or no return value to continue or false to abort |
| 28 | */ |
| 29 | public function onMovePageCheckPermissions( $oldTitle, $newTitle, $user, |
| 30 | $reason, $status |
| 31 | ); |
| 32 | } |