Member.php 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488
  1. <?php
  2. namespace Opentalent\OtWidgets\Domain\Model;
  3. use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
  4. /**
  5. * Member of an organization
  6. */
  7. class Member extends AbstractEntity
  8. {
  9. /**
  10. * id
  11. *
  12. * @var int
  13. */
  14. protected $id = -1;
  15. /**
  16. * organizationId
  17. *
  18. * @var int
  19. */
  20. protected $organizationId = -1;
  21. /**
  22. * gender ('MISS' or 'MISTER')
  23. *
  24. * @var string
  25. */
  26. protected $gender = '';
  27. /**
  28. * givenName (first name)
  29. *
  30. * @var string
  31. */
  32. protected $givenName = '';
  33. /**
  34. * name
  35. *
  36. * @var string
  37. */
  38. protected $name = '';
  39. /**
  40. * startDate
  41. *
  42. * @var \Datetime
  43. */
  44. protected $startDate = null;
  45. /**
  46. * endDate
  47. *
  48. * @var \Datetime
  49. */
  50. protected $endDate = null;
  51. /**
  52. * instrumentGroup
  53. *
  54. * @var string
  55. */
  56. protected $instrumentGroup = '';
  57. /**
  58. * instrument
  59. *
  60. * @var string
  61. */
  62. protected $instrument = '';
  63. /**
  64. * mission
  65. *
  66. * @var string
  67. */
  68. protected $mission = '';
  69. /**
  70. * personId
  71. *
  72. * @var string
  73. */
  74. protected $personId = -1;
  75. /**
  76. * image
  77. *
  78. * @var string
  79. */
  80. protected $image = '';
  81. /**
  82. * addressCity
  83. *
  84. * @var string
  85. */
  86. protected $addressCity = '';
  87. /**
  88. * streetAddress
  89. *
  90. * @var string
  91. */
  92. protected $streetAddress = '';
  93. /**
  94. * streetAddressSecond
  95. *
  96. * @var string
  97. */
  98. protected $streetAddressSecond = '';
  99. /**
  100. * streetAddressThird
  101. *
  102. * @var string
  103. */
  104. protected $streetAddressThird = '';
  105. /**
  106. * postalCode
  107. *
  108. * @var string
  109. */
  110. protected $postalCode = '';
  111. /**
  112. * telphone
  113. *
  114. * @var string
  115. */
  116. protected $telphone = '';
  117. /**
  118. * mobilPhone
  119. *
  120. * @var string
  121. */
  122. protected $mobilPhone = '';
  123. /**
  124. * email
  125. *
  126. * @var string
  127. */
  128. protected $email = '';
  129. /**
  130. * @return int
  131. */
  132. public function getId()
  133. {
  134. return $this->id;
  135. }
  136. /**
  137. * @param int $id
  138. */
  139. public function setId(int $id)
  140. {
  141. $this->id = $id;
  142. }
  143. /**
  144. * @return int
  145. */
  146. public function getOrganizationId()
  147. {
  148. return $this->organizationId;
  149. }
  150. /**
  151. * @param int $organizationId
  152. */
  153. public function setOrganizationId(int $organizationId)
  154. {
  155. $this->organizationId = $organizationId;
  156. }
  157. /**
  158. * @return string
  159. */
  160. public function getGender()
  161. {
  162. return $this->gender;
  163. }
  164. /**
  165. * @param string $gender
  166. */
  167. public function setGender($gender = '')
  168. {
  169. $this->gender = $gender;
  170. }
  171. /**
  172. * @return string
  173. */
  174. public function getGivenName()
  175. {
  176. return $this->givenName;
  177. }
  178. /**
  179. * @param string $givenName
  180. */
  181. public function setGivenName($givenName = '')
  182. {
  183. $this->givenName = $givenName;
  184. }
  185. /**
  186. * @return string
  187. */
  188. public function getName()
  189. {
  190. return $this->name;
  191. }
  192. /**
  193. * @param string $name
  194. */
  195. public function setName($name = '')
  196. {
  197. $this->name = $name;
  198. }
  199. /**
  200. * @return \Datetime
  201. */
  202. public function getStartDate()
  203. {
  204. return $this->startDate;
  205. }
  206. /**
  207. * @param \Datetime $startDate
  208. */
  209. public function setStartDate(\Datetime $startDate)
  210. {
  211. $this->startDate = $startDate;
  212. }
  213. /**
  214. * @return \Datetime
  215. */
  216. public function getEndDate()
  217. {
  218. return $this->endDate;
  219. }
  220. /**
  221. * @param \Datetime $endDate
  222. */
  223. public function setEndDate(\Datetime $endDate)
  224. {
  225. $this->endDate = $endDate;
  226. }
  227. /**
  228. * @return string
  229. */
  230. public function getInstrumentGroup()
  231. {
  232. return $this->instrumentGroup;
  233. }
  234. /**
  235. * @param string $instrumentGroup
  236. */
  237. public function setInstrumentGroup($instrumentGroup = '')
  238. {
  239. $this->instrumentGroup = $instrumentGroup;
  240. }
  241. /**
  242. * @return string
  243. */
  244. public function getInstrument()
  245. {
  246. return $this->instrument;
  247. }
  248. /**
  249. * @param string $instrument
  250. */
  251. public function setInstrument($instrument = '')
  252. {
  253. $this->instrument = $instrument;
  254. }
  255. /**
  256. * @return string
  257. */
  258. public function getMission()
  259. {
  260. return $this->mission;
  261. }
  262. /**
  263. * @param string $mission
  264. */
  265. public function setMission($mission = '')
  266. {
  267. $this->mission = $mission;
  268. }
  269. /**
  270. * @return int
  271. */
  272. public function getPersonId()
  273. {
  274. return $this->personId;
  275. }
  276. /**
  277. * @param int $personId
  278. */
  279. public function setPersonId(int $personId)
  280. {
  281. $this->personId = $personId;
  282. }
  283. /**
  284. * @return string
  285. */
  286. public function getImage()
  287. {
  288. return $this->image;
  289. }
  290. /**
  291. * @param string $image
  292. */
  293. public function setImage($image = '')
  294. {
  295. $this->image = $image;
  296. }
  297. /**
  298. * @return string
  299. */
  300. public function getAdressCity()
  301. {
  302. return $this->addressCity;
  303. }
  304. /**
  305. * @param string $addressCity
  306. */
  307. public function setAdressCity($addressCity = '')
  308. {
  309. $this->addressCity = $addressCity;
  310. }
  311. /**
  312. * @return string
  313. */
  314. public function getStreetAdress()
  315. {
  316. return $this->streetAddress;
  317. }
  318. /**
  319. * @param string $streetAddress
  320. */
  321. public function setStreetAdress($streetAddress = '')
  322. {
  323. $this->streetAddress = $streetAddress;
  324. }
  325. /**
  326. * @return string
  327. */
  328. public function getStreetAdressSecond()
  329. {
  330. return $this->streetAddressSecond;
  331. }
  332. /**
  333. * @param string $streetAddressSecond
  334. */
  335. public function setStreetAdressSecond($streetAddressSecond = '')
  336. {
  337. $this->streetAddressSecond = $streetAddressSecond;
  338. }
  339. /**
  340. * @return string
  341. */
  342. public function getStreetAdressThird()
  343. {
  344. return $this->streetAddressThird;
  345. }
  346. /**
  347. * @param string $streetAddressThird
  348. */
  349. public function setStreetAdressThird($streetAddressThird = '')
  350. {
  351. $this->streetAddressThird = $streetAddressThird;
  352. }
  353. /**
  354. * @return string
  355. */
  356. public function getPostalCode()
  357. {
  358. return $this->postalCode;
  359. }
  360. /**
  361. * @param string $postalCode
  362. */
  363. public function setPostalCode($postalCode = '')
  364. {
  365. $this->postalCode = $postalCode;
  366. }
  367. /**
  368. * @return string
  369. */
  370. public function getTelphone()
  371. {
  372. return $this->telphone;
  373. }
  374. /**
  375. * @param string $telphone
  376. */
  377. public function setTelphone($telphone = '')
  378. {
  379. $this->telphone = $telphone;
  380. }
  381. /**
  382. * @return string
  383. */
  384. public function getMobilPhone()
  385. {
  386. return $this->mobilPhone;
  387. }
  388. /**
  389. * @param string $mobilPhone
  390. */
  391. public function setMobilPhone($mobilPhone = '')
  392. {
  393. $this->mobilPhone = $mobilPhone;
  394. }
  395. /**
  396. * @return string
  397. */
  398. public function getEmail()
  399. {
  400. return $this->email;
  401. }
  402. /**
  403. * @param string $email
  404. */
  405. public function setEmail($email = '')
  406. {
  407. $this->email = $email;
  408. }
  409. /**
  410. * Return a full name for the member
  411. *
  412. * @return string
  413. */
  414. public function getFullName()
  415. {
  416. if ($this->getGivenName() && $this->getName()) {
  417. return $this->getGivenName() . ' ' . $this->getName();
  418. } else if ($this->getName() && $this->getGender()) {
  419. return 'M. ' . $this->getName();
  420. } else {
  421. return '';
  422. }
  423. }
  424. }