Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | /** |
3 | * This program is free software; you can redistribute it and/or modify |
4 | * it under the terms of the GNU General Public License as published by |
5 | * the Free Software Foundation; either version 2 of the License, or |
6 | * (at your option) any later version. |
7 | * |
8 | * This program is distributed in the hope that it will be useful, |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 | * GNU General Public License for more details. |
12 | * |
13 | * You should have received a copy of the GNU General Public License along |
14 | * with this program; if not, write to the Free Software Foundation, Inc., |
15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
16 | * http://www.gnu.org/copyleft/gpl.html |
17 | * |
18 | * @file |
19 | */ |
20 | |
21 | namespace MediaWiki\Extension\CentralAuth\Hooks; |
22 | |
23 | use MediaWiki\Context\IContextSource; |
24 | use MediaWiki\Extension\CentralAuth\User\CentralAuthUser; |
25 | use MediaWiki\Message\Message; |
26 | |
27 | /** |
28 | * This is a hook handler interface, see docs/Hooks.md in core. |
29 | * Use the hook name "CentralAuthInfoFieldsHook" to register handlers implementing this interface. |
30 | * |
31 | * @stable to implement |
32 | * @ingroup Hooks |
33 | */ |
34 | interface CentralAuthInfoFieldsHook { |
35 | |
36 | /** |
37 | * Use this hook to modify the information displayed in the 'Global account information' fieldset on |
38 | * Special:CentralAuth. |
39 | * |
40 | * @param CentralAuthUser $centralAuthUser The user being viewed on Special:CentralAuth. |
41 | * @param IContextSource $context The context used for the special page, intended to generate messages |
42 | * and get the relevant {@link Authority} object. |
43 | * @param array &$attribs The fields for the 'Global account information' fieldset. The keys are field names, but |
44 | * they are not used in the UI or for generating messages. The values are arrays with the following keys: |
45 | * - 'label': The label for the information which is a Message object or string message key |
46 | * - 'data': The data point about the global account, which should be HTML escaped |
47 | * @phan-param array<string,array{label:string|Message,data:string}> &$attribs |
48 | * |
49 | * @return bool|void True or no return value to continue or false to abort |
50 | * @since 1.43 |
51 | */ |
52 | public function onCentralAuthInfoFields( |
53 | CentralAuthUser $centralAuthUser, |
54 | IContextSource $context, |
55 | array &$attribs |
56 | ); |
57 | } |