[CLEANUP] The correct case must be used for standard PHP types in phpdoc
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Domain / Model / Category.php
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
17 /**
18 * This model represents a category (for anything).
19 *
20 * @api
21 */
22 class Category extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
23 {
24 /**
25 * @var string
26 * @validate notEmpty
27 */
28 protected $title = '';
29
30 /**
31 * @var string
32 */
33 protected $description = '';
34
35 /**
36 * @var string
37 */
38 protected $icon = '';
39
40 /**
41 * @var \TYPO3\CMS\Extbase\Domain\Model\Category|null
42 * @lazy
43 */
44 protected $parent = null;
45
46 /**
47 * Gets the title.
48 *
49 * @return string the title, might be empty
50 * @api
51 */
52 public function getTitle()
53 {
54 return $this->title;
55 }
56
57 /**
58 * Sets the title.
59 *
60 * @param string $title the title to set, may be empty
61 * @api
62 */
63 public function setTitle($title)
64 {
65 $this->title = $title;
66 }
67
68 /**
69 * Gets the description.
70 *
71 * @return string the description, might be empty
72 * @api
73 */
74 public function getDescription()
75 {
76 return $this->description;
77 }
78
79 /**
80 * Sets the description.
81 *
82 * @param string $description the description to set, may be empty
83 * @api
84 */
85 public function setDescription($description)
86 {
87 $this->description = $description;
88 }
89
90 /**
91 * Returns the icon
92 *
93 * @return string $icon
94 * @deprecated since TYPO3 v8, will be removed in TYPO3 v9
95 */
96 public function getIcon()
97 {
98 \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
99 return $this->icon;
100 }
101
102 /**
103 * Sets the icon
104 *
105 * @param string $icon
106 * @deprecated since TYPO3 v8, will be removed in TYPO3 v9
107 */
108 public function setIcon($icon)
109 {
110 \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
111 $this->icon = $icon;
112 }
113
114 /**
115 * Gets the parent category.
116 *
117 * @return \TYPO3\CMS\Extbase\Domain\Model\Category|null the parent category
118 * @api
119 */
120 public function getParent()
121 {
122 if ($this->parent instanceof \TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy) {
123 $this->parent->_loadRealInstance();
124 }
125 return $this->parent;
126 }
127
128 /**
129 * Sets the parent category.
130 *
131 * @param \TYPO3\CMS\Extbase\Domain\Model\Category $parent the parent category
132 * @api
133 */
134 public function setParent(\TYPO3\CMS\Extbase\Domain\Model\Category $parent)
135 {
136 $this->parent = $parent;
137 }
138 }