[+BUGFIX] Extbase (Persistence): Fixed a problem with empty $fieldValue causing an...
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Domain / Model / FrontendUserGroup.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 *
17 * This script is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * This copyright notice MUST APPEAR in all copies of the script!
23 ***************************************************************/
24
25 /**
26 * A Frontend User Group
27 *
28 * @package Extbase
29 * @subpackage Domain\Model
30 * @version $Id: $
31 * @scope prototype
32 * @entity
33 */
34 class Tx_Extbase_Domain_Model_FrontendUserGroup extends Tx_Extbase_DomainObject_AbstractEntity {
35
36 /**
37 * @var string
38 */
39 protected $title;
40
41 /**
42 * @var string
43 */
44 protected $lockToDomain;
45
46 /**
47 * @var string
48 */
49 protected $description;
50
51 /**
52 * @var Tx_Extbase_Persistence_ObjectStorage<Tx_Extbase_Domain_Model_FrontendUserGroup>
53 */
54 protected $subgroups;
55
56 /**
57 * Constructs a new Frontend User Group
58 *
59 */
60 public function __construct($title) {
61 $this->subgroups = new Tx_Extbase_Persistence_ObjectStorage();
62 }
63
64 /**
65 * Sets the title value
66 *
67 * @param string $title
68 * @return void
69 * @api
70 */
71 public function setTitle($title) {
72 $this->title = $title;
73 }
74
75 /**
76 * Returns the title value
77 *
78 * @return string
79 * @api
80 */
81 public function getTitle() {
82 return $this->title;
83 }
84
85 /**
86 * Sets the lockToDomain value
87 *
88 * @param string $lockToDomain
89 * @return void
90 * @api
91 */
92 public function setLockToDomain($lockToDomain) {
93 $this->lockToDomain = $lockToDomain;
94 }
95
96 /**
97 * Returns the lockToDomain value
98 *
99 * @return string
100 * @api
101 */
102 public function getLockToDomain() {
103 return $this->lockToDomain;
104 }
105
106 /**
107 * Sets the description value
108 *
109 * @param string $description
110 * @return void
111 * @api
112 */
113 public function setDescription($description) {
114 $this->description = $description;
115 }
116
117 /**
118 * Returns the description value
119 *
120 * @return string
121 * @api
122 */
123 public function getDescription() {
124 return $this->description;
125 }
126
127 /**
128 * Sets the subgroups
129 *
130 * @param Tx_Extbase_Persistence_ObjectStorage<Tx_Extbase_Domain_Model_FrontendUserGroup> $subgroups An object storage containing the subgroups to add
131 * @return void
132 * @api
133 */
134 public function setSubgroups(Tx_Extbase_Persistence_ObjectStorage $subgroups) {
135 $this->subgroups = $subgroups;
136 }
137
138 /**
139 * Adds a subgroup to the frontend user
140 *
141 * @param Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup
142 * @return void
143 * @api
144 */
145 public function addSubgroup(Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup) {
146 $this->subgroups->attach($subgroup);
147 }
148
149 /**
150 * Removes a subgroup from the frontend user group
151 *
152 * @param Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup
153 * @return void
154 * @api
155 */
156 public function removeSubgroup(Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup) {
157 $this->subgroups->detach($subgroup);
158 }
159
160 /**
161 * Returns the subgroups
162 *
163 * @return Tx_Extbase_Persistence_ObjectStorage An object storage containing the subgroups
164 * @api
165 */
166 public function getSubgroups() {
167 return $this->subgroups;
168 }
169
170 }
171 ?>