[~TASK] Extbase (Domain): Changed property usergroups to usergroup (FrontendUser...
[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 $subgroup;
55
56 /**
57 * Constructs a new Frontend User Group
58 *
59 */
60 public function __construct($title) {
61 $this->subgroup = 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. Keep in mind that the property is called "subgroup"
129 * although it can hold several subgroups.
130 *
131 * @param Tx_Extbase_Persistence_ObjectStorage<Tx_Extbase_Domain_Model_FrontendUserGroup> $subgroup An object storage containing the subgroups to add
132 * @return void
133 * @api
134 */
135 public function setSubgroup(Tx_Extbase_Persistence_ObjectStorage $subgroup) {
136 $this->subgroup = $subgroups;
137 }
138
139 /**
140 * Adds a subgroup to the frontend user
141 *
142 * @param Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup
143 * @return void
144 * @api
145 */
146 public function addSubgroup(Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup) {
147 $this->subgroup->attach($subgroup);
148 }
149
150 /**
151 * Removes a subgroup from the frontend user group
152 *
153 * @param Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup
154 * @return void
155 * @api
156 */
157 public function removeSubgroup(Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup) {
158 $this->subgroup->detach($subgroup);
159 }
160
161 /**
162 * Returns the subgroups. Keep in mind that the property is called "subgroup"
163 * although it can hold several subgroups.
164 *
165 * @return Tx_Extbase_Persistence_ObjectStorage An object storage containing the subgroups
166 * @api
167 */
168 public function getSubgroup() {
169 return $this->subgroups;
170 }
171
172 }
173 ?>