Guest User

Untitled

a guest
Jan 20th, 2014
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.49 KB | None | 0 0
  1. <?php
  2. namespace TYPO3\ConsultantProfile\Domain\Model;
  3.  
  4. /***************************************************************
  5. * Copyright notice
  6. *
  7. * (c) 2014
  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 3 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. *
  19. * This script is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU General Public License for more details.
  23. *
  24. * This copyright notice MUST APPEAR in all copies of the script!
  25. ***************************************************************/
  26.  
  27. /**
  28. *
  29. *
  30. * @package consultant_profile
  31. * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
  32. *
  33. */
  34. class Consultant extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
  35.  
  36. /**
  37. * description
  38. *
  39. * @var \string
  40. * @validate NotEmpty
  41. */
  42. protected $description;
  43.  
  44. /**
  45. * picture
  46. *
  47. * @var \string
  48. */
  49. protected $picture;
  50.  
  51. /**
  52. * user
  53. *
  54. * @var \TYPO3\CMS\Extbase\Domain\Model\FrontendUser
  55. * @var00 \int
  56. */
  57. protected $user;
  58.  
  59. /**
  60. * reference1
  61. *
  62. * @var \string
  63. */
  64. protected $reference1;
  65.  
  66. /**
  67. * reference2
  68. *
  69. * @var \string
  70. */
  71. protected $reference2;
  72.  
  73. /**
  74. * reference3
  75. *
  76. * @var \string
  77. */
  78. protected $reference3;
  79.  
  80. /**
  81. * reference4
  82. *
  83. * @var \string
  84. */
  85. protected $reference4;
  86.  
  87. /**
  88. * reference5
  89. *
  90. * @var \string
  91. */
  92. protected $reference5;
  93.  
  94. /**
  95. * categories
  96. *
  97. * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\ConsultantProfile\Domain\Model\ConsultantCategory>
  98. */
  99. protected $categories;
  100.  
  101. /**
  102. * __construct
  103. *
  104. * @return Consultant
  105. */
  106. public function __construct() {
  107. //Do not remove the next line: It would break the functionality
  108. $this->initStorageObjects();
  109. }
  110.  
  111. /**
  112. * Initializes all ObjectStorage properties.
  113. *
  114. * @return void
  115. */
  116. protected function initStorageObjects() {
  117. /**
  118. * Do not modify this method!
  119. * It will be rewritten on each save in the extension builder
  120. * You may modify the constructor of this class instead
  121. */
  122. $this->categories = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
  123. }
  124.  
  125. /**
  126. * Returns the description
  127. *
  128. * @return \string $description
  129. */
  130. public function getDescription() {
  131. return $this->description;
  132. }
  133.  
  134. /**
  135. * Sets the description
  136. *
  137. * @param \string $description
  138. * @return void
  139. */
  140. public function setDescription($description) {
  141. $this->description = $description;
  142. }
  143.  
  144. /**
  145. * Returns the picture
  146. *
  147. * @return \string $picture
  148. */
  149. public function getPicture() {
  150. return $this->picture;
  151. }
  152.  
  153. /**
  154. * Sets the picture
  155. *
  156. * @param \string $picture
  157. * @return void
  158. */
  159. public function setPicture($picture) {
  160. if (is_array($picture)) {
  161. $picture = $picture['name'];
  162. }
  163. $this->picture = $picture;
  164. }
  165.  
  166.  
  167. /**
  168. * Returns the user
  169. *
  170. * @return \TYPO3\CMS\Extbase\Domain\Model\FrontendUser $user
  171. */
  172. public function getUser() {
  173. return $this->user;
  174. }
  175.  
  176. /**
  177. * Sets the user
  178. *
  179. * @param \TYPO3\CMS\Extbase\Domain\Model\FrontendUser $user
  180. * @return void
  181. */
  182. public function setUser(\TYPO3\CMS\Extbase\Domain\Model\FrontendUser $user) {
  183. $this->user = $user;
  184. }
  185.  
  186.  
  187. /**
  188. * Returns the reference1
  189. *
  190. * @return \string $reference1
  191. */
  192. public function getReference1() {
  193. return $this->reference1;
  194. }
  195.  
  196. /**
  197. * Sets the reference1
  198. *
  199. * @param \string $reference1
  200. * @return void
  201. */
  202. public function setReference1($reference1) {
  203. $this->reference1 = $reference1;
  204. }
  205.  
  206. /**
  207. * Returns the reference2
  208. *
  209. * @return \string $reference2
  210. */
  211. public function getReference2() {
  212. return $this->reference2;
  213. }
  214.  
  215. /**
  216. * Sets the reference2
  217. *
  218. * @param \string $reference2
  219. * @return void
  220. */
  221. public function setReference2($reference2) {
  222. $this->reference2 = $reference2;
  223. }
  224.  
  225. /**
  226. * Returns the reference3
  227. *
  228. * @return \string $reference3
  229. */
  230. public function getReference3() {
  231. return $this->reference3;
  232. }
  233.  
  234. /**
  235. * Sets the reference3
  236. *
  237. * @param \string $reference3
  238. * @return void
  239. */
  240. public function setReference3($reference3) {
  241. $this->reference3 = $reference3;
  242. }
  243.  
  244. /**
  245. * Returns the reference4
  246. *
  247. * @return \string $reference4
  248. */
  249. public function getReference4() {
  250. return $this->reference4;
  251. }
  252.  
  253. /**
  254. * Sets the reference4
  255. *
  256. * @param \string $reference4
  257. * @return void
  258. */
  259. public function setReference4($reference4) {
  260. $this->reference4 = $reference4;
  261. }
  262.  
  263. /**
  264. * Returns the reference5
  265. *
  266. * @return \string $reference5
  267. */
  268. public function getReference5() {
  269. return $this->reference5;
  270. }
  271.  
  272. /**
  273. * Sets the reference5
  274. *
  275. * @param \string $reference5
  276. * @return void
  277. */
  278. public function setReference5($reference5) {
  279. $this->reference5 = $reference5;
  280. }
  281.  
  282. /**
  283. * Adds a ConsultantCategory
  284. *
  285. * @param \TYPO3\ConsultantProfile\Domain\Model\ConsultantCategory $category
  286. * @return void
  287. */
  288. public function addCategory(\TYPO3\ConsultantProfile\Domain\Model\ConsultantCategory $category) {
  289. $this->categories->attach($category);
  290. }
  291.  
  292. /**
  293. * Removes a ConsultantCategory
  294. *
  295. * @param \TYPO3\ConsultantProfile\Domain\Model\ConsultantCategory $categoryToRemove The ConsultantCategory to be removed
  296. * @return void
  297. */
  298. public function removeCategory(\TYPO3\ConsultantProfile\Domain\Model\ConsultantCategory $categoryToRemove) {
  299. $this->categories->detach($categoryToRemove);
  300. }
  301.  
  302. /**
  303. * Returns the categories
  304. *
  305. * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\ConsultantProfile\Domain\Model\ConsultantCategory> $categories
  306. */
  307. public function getCategories() {
  308. return $this->categories;
  309. }
  310.  
  311. /**
  312. * Sets the categories
  313. *
  314. * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\ConsultantProfile\Domain\Model\ConsultantCategory> $categories
  315. * @return void
  316. */
  317. public function setCategories(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $categories) {
  318. $this->categories = $categories;
  319. }
  320.  
  321. }
  322. ?>
Advertisement
Add Comment
Please, Sign In to add comment