Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
ResourceLoaderCallbacks
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
6
0.00% covered (danger)
0.00%
0 / 1
 getEventPageData
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
6
1<?php
2
3declare( strict_types=1 );
4
5namespace MediaWiki\Extension\CampaignEvents\Hooks;
6
7use MediaWiki\Config\Config;
8use MediaWiki\Extension\CampaignEvents\CampaignEventsServices;
9use MediaWiki\ResourceLoader\Context;
10
11class 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}