Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
ResourceLoaderCallbacks | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
getEventPageData | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 |
1 | <?php |
2 | |
3 | declare( strict_types=1 ); |
4 | |
5 | namespace MediaWiki\Extension\CampaignEvents\Hooks; |
6 | |
7 | use MediaWiki\Config\Config; |
8 | use MediaWiki\Extension\CampaignEvents\CampaignEventsServices; |
9 | use MediaWiki\ResourceLoader\Context; |
10 | |
11 | class ResourceLoaderCallbacks { |
12 | /** |
13 | * @param Context $context |
14 | * @param Config $config |
15 | * @return array |
16 | */ |
17 | public static function getEventPageData( Context $context, Config $config ): array { |
18 | $policyMessagesLookup = CampaignEventsServices::getPolicyMessagesLookup(); |
19 | $msgKey = $policyMessagesLookup->getPolicyMessageForRegistration(); |
20 | $msgHTML = $msgKey !== null ? $context->msg( $msgKey )->parseAsBlock() : null; |
21 | return [ 'policyMsg' => $msgHTML ]; |
22 | } |
23 | } |