Passed
Push — develop ( fb51d4...04b959 )
by Torben
02:42 queued 14s
created

InitAdministrationModuleTemplateEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 22
rs 10
c 1
b 0
f 0
wmc 4
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Extension "sf_event_mgt" for TYPO3 CMS.
7
 *
8
 * For the full copyright and license information, please read the
9
 * LICENSE.txt file that was distributed with this source code.
10
 */
11
12
namespace DERHANSEN\SfEventMgt\Event;
13
14
use DERHANSEN\SfEventMgt\Controller\AdministrationController;
15
use Psr\Http\Message\ServerRequestInterface;
16
use TYPO3\CMS\Backend\Template\ModuleTemplate;
17
use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
18
19
/**
20
 * This event is triggered when the module template of the administration module is initialized.
21
 * The event can be used to e.g. add custom menus, buttons or JavaScript.
22
 */
23
final readonly class InitAdministrationModuleTemplateEvent
0 ignored issues
show
Bug introduced by
A parse error occurred: Syntax error, unexpected T_READONLY, expecting T_CLASS on line 23 at column 6
Loading history...
24
{
25
    public function __construct(
26
        private ModuleTemplate $moduleTemplate,
27
        private UriBuilder $uriBuilder,
28
        private AdministrationController $administrationController,
29
        private ServerRequestInterface $request
30
    ) {
31
    }
32
33
    public function getModuleTemplate(): ModuleTemplate
34
    {
35
        return $this->moduleTemplate;
36
    }
37
38
    public function getUriBuilder(): UriBuilder
39
    {
40
        return $this->uriBuilder;
41
    }
42
43
    public function getAdministrationController(): AdministrationController
44
    {
45
        return $this->administrationController;
46
    }
47
48
    public function getRequest(): ServerRequestInterface
49
    {
50
        return $this->request;
51
    }
52
}
53