Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 21 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
SpecialEnableEventRegistration | |
0.00% |
0 / 21 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 16 |
|
0.00% |
0 / 1 |
2 | |||
getFormMessages | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
getValidationFlags | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | declare( strict_types=1 ); |
4 | |
5 | namespace MediaWiki\Extension\CampaignEvents\Special; |
6 | |
7 | use MediaWiki\Extension\CampaignEvents\Event\EditEventCommand; |
8 | use MediaWiki\Extension\CampaignEvents\Event\EventFactory; |
9 | use MediaWiki\Extension\CampaignEvents\Event\Store\IEventLookup; |
10 | use MediaWiki\Extension\CampaignEvents\Hooks\CampaignEventsHookRunner; |
11 | use MediaWiki\Extension\CampaignEvents\MWEntity\CampaignsCentralUserLookup; |
12 | use MediaWiki\Extension\CampaignEvents\MWEntity\PageURLResolver; |
13 | use MediaWiki\Extension\CampaignEvents\MWEntity\WikiLookup; |
14 | use MediaWiki\Extension\CampaignEvents\Organizers\OrganizersStore; |
15 | use MediaWiki\Extension\CampaignEvents\Permissions\PermissionChecker; |
16 | use MediaWiki\Extension\CampaignEvents\PolicyMessagesLookup; |
17 | use MediaWiki\Extension\CampaignEvents\Questions\EventQuestionsRegistry; |
18 | use MediaWiki\Extension\CampaignEvents\TrackingTool\TrackingToolRegistry; |
19 | |
20 | class SpecialEnableEventRegistration extends AbstractEventRegistrationSpecialPage { |
21 | public const PAGE_NAME = 'EnableEventRegistration'; |
22 | |
23 | public function __construct( |
24 | IEventLookup $eventLookup, |
25 | EventFactory $eventFactory, |
26 | EditEventCommand $editEventCommand, |
27 | PolicyMessagesLookup $policyMessagesLookup, |
28 | OrganizersStore $organizersStore, |
29 | PermissionChecker $permissionChecker, |
30 | CampaignsCentralUserLookup $centralUserLookup, |
31 | TrackingToolRegistry $trackingToolRegistry, |
32 | EventQuestionsRegistry $eventQuestionsRegistry, |
33 | CampaignEventsHookRunner $hookRunner, |
34 | PageURLResolver $pageURLResolver, |
35 | WikiLookup $wikiLookup |
36 | ) { |
37 | parent::__construct( |
38 | self::PAGE_NAME, |
39 | PermissionChecker::ENABLE_REGISTRATIONS_RIGHT, |
40 | $eventLookup, |
41 | $eventFactory, |
42 | $editEventCommand, |
43 | $policyMessagesLookup, |
44 | $organizersStore, |
45 | $permissionChecker, |
46 | $centralUserLookup, |
47 | $trackingToolRegistry, |
48 | $eventQuestionsRegistry, |
49 | $hookRunner, |
50 | $pageURLResolver, |
51 | $wikiLookup |
52 | ); |
53 | } |
54 | |
55 | /** |
56 | * @inheritDoc |
57 | */ |
58 | protected function getFormMessages(): array { |
59 | return [ |
60 | 'details-section-subtitle' => 'campaignevents-edit-form-details-subtitle', |
61 | 'submit' => 'campaignevents-enable-registration-form-submit', |
62 | ]; |
63 | } |
64 | |
65 | /** |
66 | * @inheritDoc |
67 | */ |
68 | protected function getValidationFlags(): int { |
69 | return EventFactory::VALIDATE_ALL; |
70 | } |
71 | } |