1
|
|
|
<?php |
2
|
|
|
namespace ApacheSolrForTypo3\Solr\System\Mvc\Backend; |
3
|
|
|
|
4
|
|
|
/*************************************************************** |
5
|
|
|
* Copyright notice |
6
|
|
|
* |
7
|
|
|
* (c) 2010-2017 dkd Internet Service GmbH <[email protected]> |
8
|
|
|
* All rights reserved |
9
|
|
|
* |
10
|
|
|
* This script is part of the TYPO3 project. The TYPO3 project is |
11
|
|
|
* free software; you can redistribute it and/or modify |
12
|
|
|
* it under the terms of the GNU General Public License as published by |
13
|
|
|
* the Free Software Foundation; either version 2 of the License, or |
14
|
|
|
* (at your option) any later version. |
15
|
|
|
* |
16
|
|
|
* The GNU General Public License can be found at |
17
|
|
|
* http://www.gnu.org/copyleft/gpl.html. |
18
|
|
|
* |
19
|
|
|
* This script is distributed in the hope that it will be useful, |
20
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
21
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22
|
|
|
* GNU General Public License for more details. |
23
|
|
|
* |
24
|
|
|
* This copyright notice MUST APPEAR in all copies of the script! |
25
|
|
|
***************************************************************/ |
26
|
|
|
|
27
|
|
|
use ApacheSolrForTypo3\Solr\Site; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* Represents the state of needed for backend module components e.g. selected option from select menu, enabled or disabled button, etc.. |
31
|
|
|
*/ |
32
|
|
|
class ModuleData |
33
|
|
|
{ |
34
|
|
|
/** |
35
|
|
|
* @var Site |
36
|
|
|
*/ |
37
|
|
|
protected $site = null; |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @var string |
41
|
|
|
*/ |
42
|
|
|
protected $core = ''; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* Gets the site to work with. |
46
|
|
|
* |
47
|
|
|
* @return Site |
48
|
|
|
*/ |
49
|
|
|
public function getSite() |
50
|
|
|
{ |
51
|
|
|
return $this->site; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* Sets the site to work with. |
56
|
|
|
* |
57
|
|
|
* @param Site $site |
58
|
|
|
* @return void |
59
|
|
|
*/ |
60
|
|
|
public function setSite(Site $site) |
61
|
|
|
{ |
62
|
|
|
$this->site = $site; |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* Gets the name of the currently selected core |
67
|
|
|
* |
68
|
|
|
* @return string Selected core name |
69
|
|
|
*/ |
70
|
|
|
public function getCore() |
71
|
|
|
{ |
72
|
|
|
return $this->core; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* Sets the name of the currently selected core |
77
|
|
|
* |
78
|
|
|
* @param string $core Selected core name |
79
|
|
|
*/ |
80
|
|
|
public function setCore($core) |
81
|
|
|
{ |
82
|
|
|
$this->core = $core; |
83
|
|
|
} |
84
|
|
|
} |
85
|
|
|
|