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 | namespace MediaWiki\Hook; |
4 | |
5 | /** |
6 | * This is a hook handler interface, see docs/Hooks.md. |
7 | * Use the hook name "SpecialCreateAccountBenefits" to register handlers implementing this interface. |
8 | * |
9 | * @stable to implement |
10 | * @ingroup Hooks |
11 | */ |
12 | interface SpecialCreateAccountBenefitsHook { |
13 | |
14 | /** |
15 | * Replace the default signup page content about the benefits of registering an account |
16 | * ("Wikipedia is made by people like you...") on Special:CreateAccount. |
17 | * |
18 | * @param string|null &$html HTML to use instead of the default .mw-createacct-benefits-container |
19 | * block. By default, this is null, which means the default content will be used. |
20 | * @param array $info Array of information: |
21 | * - context: (IContextSource) Context object. |
22 | * - form: (HTMLForm) The signup form. Read-only - the form HTML has already been generated. |
23 | * @phan-param array{context:\MediaWiki\Context\IContextSource,form:\HTMLForm} $info |
24 | * @param array &$options Array of modifiable options: |
25 | * - beforeForm: (bool, default false) Whether to insert the HTML before the form. This is |
26 | * mainly useful on mobile (where the login form might push the benefits out of view; but |
27 | * also, a long benefits block might push the form out of view). |
28 | * @phan-param array{beforeForm:bool} &$options |
29 | * @return bool|void True or no return value to continue or false to abort. |
30 | * @since 1.40 |
31 | */ |
32 | public function onSpecialCreateAccountBenefits( ?string &$html, array $info, array &$options ); |
33 | |
34 | } |