[TASK] Re-work/simplify copyright header in PHP files - Part 9
[Packages/TYPO3.CMS.git] / typo3 / sysext / extensionmanager / Classes / Domain / Model / ConfigurationSubcategory.php
1 <?php
2 namespace TYPO3\CMS\Extensionmanager\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
17 /**
18 * Model for configuration sub categories
19 *
20 * Configuration options can be structured with categories and sub categories.
21 * Categories are usually displayed as tabs and sub categories are used to
22 * group configuration items in one tab.
23 *
24 * @author Susanne Moog <typo3@susannemoog.de>
25 */
26 class ConfigurationSubcategory extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
27
28 /**
29 * @var string
30 */
31 protected $name = '';
32
33 /**
34 * @var string The sub category label
35 */
36 protected $label = '';
37
38 /**
39 * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extensionmanager\Domain\Model\ConfigurationItem>
40 */
41 protected $items;
42
43 /**
44 * Constructs this Category
45 */
46 public function __construct() {
47 $this->items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
48 }
49
50 /**
51 * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $items
52 * @return void
53 */
54 public function setItems($items) {
55 $this->items = $items;
56 }
57
58 /**
59 * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
60 */
61 public function getItems() {
62 return $this->items;
63 }
64
65 /**
66 * Adds a subcategory
67 *
68 * @param \TYPO3\CMS\Extensionmanager\Domain\Model\ConfigurationItem $item
69 * @return void
70 */
71 public function addItem(\TYPO3\CMS\Extensionmanager\Domain\Model\ConfigurationItem $item) {
72 $this->items->attach($item);
73 }
74
75 /**
76 * @param string $name
77 * @return void
78 */
79 public function setName($name) {
80 $this->name = $name;
81 }
82
83 /**
84 * @return string
85 */
86 public function getName() {
87 return $this->name;
88 }
89
90 /**
91 * Set sub category label
92 *
93 * @param string $label
94 * @return void
95 */
96 public function setLabel($label) {
97 $this->label = $label;
98 }
99
100 /**
101 * Get sub category label
102 *
103 * @return string
104 */
105 public function getLabel() {
106 return $this->label;
107 }
108
109 }