Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
Hooks | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
12 | |
0.00% |
0 / 1 |
onAuthChangeFormFields | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
12 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\Campaigns; |
4 | |
5 | use MediaWiki\SpecialPage\Hook\AuthChangeFormFieldsHook; |
6 | |
7 | class Hooks implements AuthChangeFormFieldsHook { |
8 | /** @inheritDoc */ |
9 | public function onAuthChangeFormFields( |
10 | $requests, $fieldInfo, &$formDescriptor, $action |
11 | ) { |
12 | if ( isset( $formDescriptor['createOrLogin'] ) ) { |
13 | $formDescriptor['createOrLogin']['linkQuery'] .= |
14 | ( $formDescriptor['createOrLogin']['linkQuery'] ? '&' : '' ) . 'campaign=loginCTA'; |
15 | } |
16 | } |
17 | } |