Debian Codegraph @

includes/RenameUser/Hook/RenameUserWarningHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\RenameUser\Hook;
4
5 /**
6 * This is a hook handler interface, see docs/Hooks.md.
7 * Use the hook name "RenameUserWarning" to register handlers implementing this interface.
8 *
9 * Between MediaWiki 1.36 and 1.39, this interface was part of the Renameuser extension,
10 * with the namespace MediaWiki\Extension\Renameuser\Hook.
11 *
12 * @stable to implement
13 * @ingroup Hooks
14 * @since 1.40
15 */
16 interface RenameUserWarningHook {
17
18 /**
19 * Called on Special:Renameuser before a user is renamed.
20 * Will show the given warnings to the user and ask for a confirmation.
21 *
22 * @param string $oldUsername The old username as a page title.
23 * @param string $newUsername The new username as a page title.
24 * @param array &$warnings An array with 1 or more message keys, and 1 or more parameters
25 * for the warnings to be shown
26 */
27 public function onRenameUserWarning( string $oldUsername, string $newUsername, array &$warnings ): void;
28
29 }