Raised DBAL version from 1.1.5 to 1.1.6
[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: FrontendUserGroup.php 2143 2010-03-30 09:28:26Z jocrau $
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->setTitle($title);
63 $this->subgroup = new Tx_Extbase_Persistence_ObjectStorage();
64 }
65
66 /**
67 * Sets the title value
68 *
69 * @param string $title
70 * @return void
71 * @api
72 */
73 public function setTitle($title) {
74 $this->title = $title;
75 }
76
77 /**
78 * Returns the title value
79 *
80 * @return string
81 * @api
82 */
83 public function getTitle() {
84 return $this->title;
85 }
86
87 /**
88 * Sets the lockToDomain value
89 *
90 * @param string $lockToDomain
91 * @return void
92 * @api
93 */
94 public function setLockToDomain($lockToDomain) {
95 $this->lockToDomain = $lockToDomain;
96 }
97
98 /**
99 * Returns the lockToDomain value
100 *
101 * @return string
102 * @api
103 */
104 public function getLockToDomain() {
105 return $this->lockToDomain;
106 }
107
108 /**
109 * Sets the description value
110 *
111 * @param string $description
112 * @return void
113 * @api
114 */
115 public function setDescription($description) {
116 $this->description = $description;
117 }
118
119 /**
120 * Returns the description value
121 *
122 * @return string
123 * @api
124 */
125 public function getDescription() {
126 return $this->description;
127 }
128
129 /**
130 * Sets the subgroups. Keep in mind that the property is called "subgroup"
131 * although it can hold several subgroups.
132 *
133 * @param Tx_Extbase_Persistence_ObjectStorage<Tx_Extbase_Domain_Model_FrontendUserGroup> $subgroup An object storage containing the subgroups to add
134 * @return void
135 * @api
136 */
137 public function setSubgroup(Tx_Extbase_Persistence_ObjectStorage $subgroup) {
138 $this->subgroup = $subgroup;
139 }
140
141 /**
142 * Adds a subgroup to the frontend user
143 *
144 * @param Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup
145 * @return void
146 * @api
147 */
148 public function addSubgroup(Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup) {
149 $this->subgroup->attach($subgroup);
150 }
151
152 /**
153 * Removes a subgroup from the frontend user group
154 *
155 * @param Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup
156 * @return void
157 * @api
158 */
159 public function removeSubgroup(Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup) {
160 $this->subgroup->detach($subgroup);
161 }
162
163 /**
164 * Returns the subgroups. Keep in mind that the property is called "subgroup"
165 * although it can hold several subgroups.
166 *
167 * @return Tx_Extbase_Persistence_ObjectStorage An object storage containing the subgroups
168 * @api
169 */
170 public function getSubgroup() {
171 return $this->subgroups;
172 }
173
174 }
175 ?>