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 | public function onAuthChangeFormFields( |
9 | $requests, $fieldInfo, &$formDescriptor, $action |
10 | ) { |
11 | if ( isset( $formDescriptor['createOrLogin'] ) ) { |
12 | $formDescriptor['createOrLogin']['linkQuery'] .= |
13 | ( $formDescriptor['createOrLogin']['linkQuery'] ? '&' : '' ) . 'campaign=loginCTA'; |
14 | } |
15 | } |
16 | } |