Debian Codegraph @

includes/block/Hook/GetUserBlockHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Block\Hook;
4
5 use MediaWiki\Block\AbstractBlock;
6 use MediaWiki\User\User;
7
8 /**
9 * This is a hook handler interface, see docs/Hooks.md.
10 * Use the hook name "GetUserBlock" to register handlers implementing this interface.
11 *
12 * @stable to implement
13 * @ingroup Hooks
14 */
15 interface GetUserBlockHook {
16 /**
17 * Use this hook to modify the block found by the block manager. This may be a
18 * single block or a composite block made from multiple blocks; the original
19 * blocks can be seen using CompositeBlock::getOriginalBlocks().
20 *
21 * @since 1.35
22 *
23 * @param User $user User targeted by the block
24 * @param string|null $ip IP of the current request if $user is the current user
25 * and they're not exempted from IP blocks. Null otherwise.
26 * @param AbstractBlock|null &$block User's block, or null if none was found
27 * @return bool|void True or no return value to continue or false to abort
28 */
29 public function onGetUserBlock( $user, $ip, &$block );
30 }