TYPO3  7.6
FrontendUserGroup.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Extbase\Domain\Model;
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
23 {
27  protected $title = '';
28 
32  protected $lockToDomain = '';
33 
37  protected $description = '';
38 
42  protected $subgroup;
43 
49  public function __construct($title = '')
50  {
51  $this->setTitle($title);
52  $this->subgroup = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
53  }
54 
62  public function setTitle($title)
63  {
64  $this->title = $title;
65  }
66 
73  public function getTitle()
74  {
75  return $this->title;
76  }
77 
85  public function setLockToDomain($lockToDomain)
86  {
87  $this->lockToDomain = $lockToDomain;
88  }
89 
96  public function getLockToDomain()
97  {
98  return $this->lockToDomain;
99  }
100 
108  public function setDescription($description)
109  {
110  $this->description = $description;
111  }
112 
119  public function getDescription()
120  {
121  return $this->description;
122  }
123 
132  public function setSubgroup(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $subgroup)
133  {
134  $this->subgroup = $subgroup;
135  }
136 
144  public function addSubgroup(\TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup $subgroup)
145  {
146  $this->subgroup->attach($subgroup);
147  }
148 
156  public function removeSubgroup(\TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup $subgroup)
157  {
158  $this->subgroup->detach($subgroup);
159  }
160 
168  public function getSubgroup()
169  {
170  return $this->subgroup;
171  }
172 }