77f3adf6855f94e617643ca07525123d2cd7143f
[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 * @api
34 */
35 class Tx_Extbase_Domain_Model_FrontendUserGroup extends Tx_Extbase_DomainObject_AbstractEntity {
36
37 /**
38 * @var string
39 */
40 protected $title;
41
42 /**
43 * @var string
44 */
45 protected $lockToDomain;
46
47 /**
48 * @var string
49 */
50 protected $description;
51
52 /**
53 * @var Tx_Extbase_Persistence_ObjectStorage<Tx_Extbase_Domain_Model_FrontendUserGroup>
54 */
55 protected $subgroup;
56
57 /**
58 * Constructs a new Frontend User Group
59 *
60 */
61 public function __construct($title) {
62 $this->subgroup = new Tx_Extbase_Persistence_ObjectStorage();
63 }
64
65 /**
66 * Sets the title value
67 *
68 * @param string $title
69 * @return void
70 * @api
71 */
72 public function setTitle($title) {
73 $this->title = $title;
74 }
75
76 /**
77 * Returns the title value
78 *
79 * @return string
80 * @api
81 */
82 public function getTitle() {
83 return $this->title;
84 }
85
86 /**
87 * Sets the lockToDomain value
88 *
89 * @param string $lockToDomain
90 * @return void
91 * @api
92 */
93 public function setLockToDomain($lockToDomain) {
94 $this->lockToDomain = $lockToDomain;
95 }
96
97 /**
98 * Returns the lockToDomain value
99 *
100 * @return string
101 * @api
102 */
103 public function getLockToDomain() {
104 return $this->lockToDomain;
105 }
106
107 /**
108 * Sets the description value
109 *
110 * @param string $description
111 * @return void
112 * @api
113 */
114 public function setDescription($description) {
115 $this->description = $description;
116 }
117
118 /**
119 * Returns the description value
120 *
121 * @return string
122 * @api
123 */
124 public function getDescription() {
125 return $this->description;
126 }
127
128 /**
129 * Sets the subgroups. Keep in mind that the property is called "subgroup"
130 * although it can hold several subgroups.
131 *
132 * @param Tx_Extbase_Persistence_ObjectStorage<Tx_Extbase_Domain_Model_FrontendUserGroup> $subgroup An object storage containing the subgroups to add
133 * @return void
134 * @api
135 */
136 public function setSubgroup(Tx_Extbase_Persistence_ObjectStorage $subgroup) {
137 $this->subgroup = $subgroup;
138 }
139
140 /**
141 * Adds a subgroup to the frontend user
142 *
143 * @param Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup
144 * @return void
145 * @api
146 */
147 public function addSubgroup(Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup) {
148 $this->subgroup->attach($subgroup);
149 }
150
151 /**
152 * Removes a subgroup from the frontend user group
153 *
154 * @param Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup
155 * @return void
156 * @api
157 */
158 public function removeSubgroup(Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup) {
159 $this->subgroup->detach($subgroup);
160 }
161
162 /**
163 * Returns the subgroups. Keep in mind that the property is called "subgroup"
164 * although it can hold several subgroups.
165 *
166 * @return Tx_Extbase_Persistence_ObjectStorage An object storage containing the subgroups
167 * @api
168 */
169 public function getSubgroup() {
170 return $this->subgroups;
171 }
172
173 }
174 ?>