Passed
Pull Request — task/3376-TYPO3_12_compatibili... (#3452)
by
unknown
41:26
created

FormEvent::getPluginNamespace()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
/*
5
 * This file is part of the TYPO3 CMS project.
6
 *
7
 * It is free software; you can redistribute it and/or modify it under
8
 * the terms of the GNU General Public License, either version 2
9
 * of the License, or any later version.
10
 *
11
 * For the full copyright and license information, please read the
12
 * LICENSE.txt file that was distributed with this source code.
13
 *
14
 * The TYPO3 project - inspiring people to share!
15
 */
16
17
namespace ApacheSolrForTypo3\Solr\Event\Search;
18
19
use ApacheSolrForTypo3\Solr\Search;
20
21
/**
22
 * This event is triggered before setting the form values
23
 *
24
 * @author Lars Tode <[email protected]>
25
 */
26
final class FormEvent
27
{
28
    private Search $search;
29
    private array $additionalFilters;
30
    private string $pluginNamespace;
31
32
    /**
33
     * @param Search $search
34
     * @param array $additionalFilters
35
     * @param string $pluginNamespace
36
     */
37
    public function __construct(Search $search, array $additionalFilters, string $pluginNamespace)
38
    {
39
        $this->search = $search;
40
        $this->additionalFilters = $additionalFilters;
41
        $this->pluginNamespace = $pluginNamespace;
42
    }
43
44
    /**
45
     * @return Search
46
     */
47
    public function getSearch(): Search
48
    {
49
        return $this->search;
50
    }
51
52
    /**
53
     * @return array
54
     */
55
    public function getAdditionalFilters(): array
56
    {
57
        return $this->additionalFilters;
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getPluginNamespace(): string
64
    {
65
        return $this->pluginNamespace;
66
    }
67
}
68