[BUGFIX] Replace generic ObjectStorage in the whole core
[Packages/TYPO3.CMS.git] / typo3 / sysext / extensionmanager / Classes / Domain / Model / ConfigurationSubcategory.php
1 <?php
2 namespace TYPO3\CMS\Extensionmanager\Domain\Model;
3
4 /***************************************************************
5 * Copyright notice
6 *
7 * (c) 2012 Susanne Moog, <typo3@susannemoog.de>
8 * All rights reserved
9 *
10 * This script is part of the TYPO3 project. The TYPO3 project is
11 * free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * The GNU General Public License can be found at
17 * http://www.gnu.org/copyleft/gpl.html.
18 * A copy is found in the textfile GPL.txt and important notices to the license
19 * from the author is found in LICENSE.txt distributed with these scripts.
20 *
21 *
22 * This script is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * This copyright notice MUST APPEAR in all copies of the script!
28 ***************************************************************/
29 /**
30 * Model for configuration subcategories
31 *
32 * @author Susanne Moog <typo3@susannemoog.de>
33 * @package Extension Manager
34 * @subpackage Model
35 */
36 class ConfigurationSubcategory extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
37
38 /**
39 * @var string
40 */
41 protected $name = '';
42
43 /**
44 * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extensionmanager\Domain\Model\ConfigurationItem>
45 */
46 protected $items;
47
48 /**
49 * Constructs this Category
50 */
51 public function __construct() {
52 $this->items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
53 }
54
55 /**
56 * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $items
57 * @return void
58 */
59 public function setItems($items) {
60 $this->items = $items;
61 }
62
63 /**
64 * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
65 */
66 public function getItems() {
67 return $this->items;
68 }
69
70 /**
71 * Adds a subcategory
72 *
73 * @param \TYPO3\CMS\Extensionmanager\Domain\Model\ConfigurationItem $item
74 * @return void
75 */
76 public function addItem(\TYPO3\CMS\Extensionmanager\Domain\Model\ConfigurationItem $item) {
77 $this->items->attach($item);
78 }
79
80 /**
81 * @param string $name
82 * @return void
83 */
84 public function setName($name) {
85 $this->name = $name;
86 }
87
88 /**
89 * @return string
90 */
91 public function getName() {
92 return $this->name;
93 }
94
95 }
96
97
98 ?>