1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
/* |
6
|
|
|
* This file is part of the TYPO3 CMS project. |
7
|
|
|
* |
8
|
|
|
* It is free software; you can redistribute it and/or modify it under |
9
|
|
|
* the terms of the GNU General Public License, either version 2 |
10
|
|
|
* of the License, or any later version. |
11
|
|
|
* |
12
|
|
|
* For the full copyright and license information, please read the |
13
|
|
|
* LICENSE.txt file that was distributed with this source code. |
14
|
|
|
* |
15
|
|
|
* The TYPO3 project - inspiring people to share! |
16
|
|
|
*/ |
17
|
|
|
|
18
|
|
|
namespace ApacheSolrForTypo3\Solr\Mvc\Controller; |
19
|
|
|
|
20
|
|
|
use ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\SearchResultSet; |
21
|
|
|
use ApacheSolrForTypo3\Solr\System\Configuration\TypoScriptConfiguration; |
22
|
|
|
use TYPO3\CMS\Core\Utility\GeneralUtility; |
23
|
|
|
use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* Class SolrControllerContext |
27
|
|
|
* |
28
|
|
|
* @author Frans Saris <[email protected]> |
29
|
|
|
* @author Timo Hund <[email protected]> |
30
|
|
|
*/ |
31
|
|
|
class SolrControllerContext |
32
|
|
|
{ |
33
|
|
|
/** |
34
|
|
|
* @var TypoScriptConfiguration|null |
35
|
|
|
*/ |
36
|
|
|
protected ?TypoScriptConfiguration $typoScriptConfiguration = null; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @var SearchResultSet|null |
40
|
|
|
*/ |
41
|
|
|
protected ?SearchResultSet $searchResultSet = null; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @param TypoScriptConfiguration $typoScriptConfiguration |
45
|
|
|
*/ |
46
|
|
|
public function setTypoScriptConfiguration(TypoScriptConfiguration $typoScriptConfiguration): void |
47
|
|
|
{ |
48
|
|
|
$this->typoScriptConfiguration = $typoScriptConfiguration; |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @return TypoScriptConfiguration|null |
53
|
|
|
*/ |
54
|
|
|
public function getTypoScriptConfiguration(): ?TypoScriptConfiguration |
55
|
|
|
{ |
56
|
|
|
return $this->typoScriptConfiguration; |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* @param SearchResultSet $searchResultSet |
61
|
|
|
*/ |
62
|
|
|
public function setSearchResultSet(SearchResultSet $searchResultSet): void |
63
|
|
|
{ |
64
|
|
|
$this->searchResultSet = $searchResultSet; |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @return SearchResultSet|null |
69
|
|
|
*/ |
70
|
|
|
public function getSearchResultSet(): ?SearchResultSet |
71
|
|
|
{ |
72
|
|
|
return $this->searchResultSet; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
public function getUriBuilder(): UriBuilder |
76
|
|
|
{ |
77
|
|
|
return GeneralUtility::makeInstance(UriBuilder::class); |
78
|
|
|
} |
79
|
|
|
} |
80
|
|
|
|