var/classes/DataObject/Job.php line 48

Open in your IDE?
  1. <?php
  2. /**
  3.  * Inheritance: no
  4.  * Variants: no
  5.  *
  6.  * Fields Summary:
  7.  * - date [date]
  8.  * - image [image]
  9.  * - title [input]
  10.  * - hoursPerWeek [input]
  11.  * - subTitle [input]
  12.  * - overviewText [wysiwyg]
  13.  * - AFASUrl [link]
  14.  * - intro [wysiwyg]
  15.  * - function [wysiwyg]
  16.  * - aboutYou [wysiwyg]
  17.  * - vakteam [manyToOneRelation]
  18.  * - offer [wysiwyg]
  19.  * - info [wysiwyg]
  20.  * - pdf [manyToOneRelation]
  21.  * - closeDate [date]
  22.  */
  23. namespace Pimcore\Model\DataObject;
  24. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  25. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  26. /**
  27. * @method static \Pimcore\Model\DataObject\Job\Listing getList(array $config = [])
  28. * @method static \Pimcore\Model\DataObject\Job\Listing|\Pimcore\Model\DataObject\Job|null getByDate($value, $limit = 0, $offset = 0, $objectTypes = null)
  29. * @method static \Pimcore\Model\DataObject\Job\Listing|\Pimcore\Model\DataObject\Job|null getByImage($value, $limit = 0, $offset = 0, $objectTypes = null)
  30. * @method static \Pimcore\Model\DataObject\Job\Listing|\Pimcore\Model\DataObject\Job|null getByTitle($value, $limit = 0, $offset = 0, $objectTypes = null)
  31. * @method static \Pimcore\Model\DataObject\Job\Listing|\Pimcore\Model\DataObject\Job|null getByHoursPerWeek($value, $limit = 0, $offset = 0, $objectTypes = null)
  32. * @method static \Pimcore\Model\DataObject\Job\Listing|\Pimcore\Model\DataObject\Job|null getBySubTitle($value, $limit = 0, $offset = 0, $objectTypes = null)
  33. * @method static \Pimcore\Model\DataObject\Job\Listing|\Pimcore\Model\DataObject\Job|null getByOverviewText($value, $limit = 0, $offset = 0, $objectTypes = null)
  34. * @method static \Pimcore\Model\DataObject\Job\Listing|\Pimcore\Model\DataObject\Job|null getByIntro($value, $limit = 0, $offset = 0, $objectTypes = null)
  35. * @method static \Pimcore\Model\DataObject\Job\Listing|\Pimcore\Model\DataObject\Job|null getByFunction($value, $limit = 0, $offset = 0, $objectTypes = null)
  36. * @method static \Pimcore\Model\DataObject\Job\Listing|\Pimcore\Model\DataObject\Job|null getByAboutYou($value, $limit = 0, $offset = 0, $objectTypes = null)
  37. * @method static \Pimcore\Model\DataObject\Job\Listing|\Pimcore\Model\DataObject\Job|null getByVakteam($value, $limit = 0, $offset = 0, $objectTypes = null)
  38. * @method static \Pimcore\Model\DataObject\Job\Listing|\Pimcore\Model\DataObject\Job|null getByOffer($value, $limit = 0, $offset = 0, $objectTypes = null)
  39. * @method static \Pimcore\Model\DataObject\Job\Listing|\Pimcore\Model\DataObject\Job|null getByInfo($value, $limit = 0, $offset = 0, $objectTypes = null)
  40. * @method static \Pimcore\Model\DataObject\Job\Listing|\Pimcore\Model\DataObject\Job|null getByPdf($value, $limit = 0, $offset = 0, $objectTypes = null)
  41. * @method static \Pimcore\Model\DataObject\Job\Listing|\Pimcore\Model\DataObject\Job|null getByCloseDate($value, $limit = 0, $offset = 0, $objectTypes = null)
  42. */
  43. class Job extends Concrete
  44. {
  45. protected $o_classId "job";
  46. protected $o_className "Job";
  47. protected $date;
  48. protected $image;
  49. protected $title;
  50. protected $hoursPerWeek;
  51. protected $subTitle;
  52. protected $overviewText;
  53. protected $AFASUrl;
  54. protected $intro;
  55. protected $function;
  56. protected $aboutYou;
  57. protected $vakteam;
  58. protected $offer;
  59. protected $info;
  60. protected $pdf;
  61. protected $closeDate;
  62. /**
  63. * @param array $values
  64. * @return \Pimcore\Model\DataObject\Job
  65. */
  66. public static function create($values = array()) {
  67.     $object = new static();
  68.     $object->setValues($values);
  69.     return $object;
  70. }
  71. /**
  72. * Get date - Date
  73. * @return \Carbon\Carbon|null
  74. */
  75. public function getDate(): ?\Carbon\Carbon
  76. {
  77.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  78.         $preValue $this->preGetValue("date");
  79.         if ($preValue !== null) {
  80.             return $preValue;
  81.         }
  82.     }
  83.     $data $this->date;
  84.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  85.         return $data->getPlain();
  86.     }
  87.     return $data;
  88. }
  89. /**
  90. * Set date - Date
  91. * @param \Carbon\Carbon|null $date
  92. * @return \Pimcore\Model\DataObject\Job
  93. */
  94. public function setDate(?\Carbon\Carbon $date)
  95. {
  96.     $this->date $date;
  97.     return $this;
  98. }
  99. /**
  100. * Get image - Image
  101. * @return \Pimcore\Model\Asset\Image|null
  102. */
  103. public function getImage(): ?\Pimcore\Model\Asset\Image
  104. {
  105.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  106.         $preValue $this->preGetValue("image");
  107.         if ($preValue !== null) {
  108.             return $preValue;
  109.         }
  110.     }
  111.     $data $this->image;
  112.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  113.         return $data->getPlain();
  114.     }
  115.     return $data;
  116. }
  117. /**
  118. * Set image - Image
  119. * @param \Pimcore\Model\Asset\Image|null $image
  120. * @return \Pimcore\Model\DataObject\Job
  121. */
  122. public function setImage(?\Pimcore\Model\Asset\Image $image)
  123. {
  124.     $this->image $image;
  125.     return $this;
  126. }
  127. /**
  128. * Get title - Title
  129. * @return string|null
  130. */
  131. public function getTitle(): ?string
  132. {
  133.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  134.         $preValue $this->preGetValue("title");
  135.         if ($preValue !== null) {
  136.             return $preValue;
  137.         }
  138.     }
  139.     $data $this->title;
  140.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  141.         return $data->getPlain();
  142.     }
  143.     return $data;
  144. }
  145. /**
  146. * Set title - Title
  147. * @param string|null $title
  148. * @return \Pimcore\Model\DataObject\Job
  149. */
  150. public function setTitle(?string $title)
  151. {
  152.     $this->title $title;
  153.     return $this;
  154. }
  155. /**
  156. * Get hoursPerWeek - Hours Per Week
  157. * @return string|null
  158. */
  159. public function getHoursPerWeek(): ?string
  160. {
  161.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  162.         $preValue $this->preGetValue("hoursPerWeek");
  163.         if ($preValue !== null) {
  164.             return $preValue;
  165.         }
  166.     }
  167.     $data $this->hoursPerWeek;
  168.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  169.         return $data->getPlain();
  170.     }
  171.     return $data;
  172. }
  173. /**
  174. * Set hoursPerWeek - Hours Per Week
  175. * @param string|null $hoursPerWeek
  176. * @return \Pimcore\Model\DataObject\Job
  177. */
  178. public function setHoursPerWeek(?string $hoursPerWeek)
  179. {
  180.     $this->hoursPerWeek $hoursPerWeek;
  181.     return $this;
  182. }
  183. /**
  184. * Get subTitle - Sub-kop
  185. * @return string|null
  186. */
  187. public function getSubTitle(): ?string
  188. {
  189.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  190.         $preValue $this->preGetValue("subTitle");
  191.         if ($preValue !== null) {
  192.             return $preValue;
  193.         }
  194.     }
  195.     $data $this->subTitle;
  196.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  197.         return $data->getPlain();
  198.     }
  199.     return $data;
  200. }
  201. /**
  202. * Set subTitle - Sub-kop
  203. * @param string|null $subTitle
  204. * @return \Pimcore\Model\DataObject\Job
  205. */
  206. public function setSubTitle(?string $subTitle)
  207. {
  208.     $this->subTitle $subTitle;
  209.     return $this;
  210. }
  211. /**
  212. * Get overviewText - Overview Text
  213. * @return string|null
  214. */
  215. public function getOverviewText(): ?string
  216. {
  217.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  218.         $preValue $this->preGetValue("overviewText");
  219.         if ($preValue !== null) {
  220.             return $preValue;
  221.         }
  222.     }
  223.     $data $this->getClass()->getFieldDefinition("overviewText")->preGetData($this);
  224.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  225.         return $data->getPlain();
  226.     }
  227.     return $data;
  228. }
  229. /**
  230. * Set overviewText - Overview Text
  231. * @param string|null $overviewText
  232. * @return \Pimcore\Model\DataObject\Job
  233. */
  234. public function setOverviewText(?string $overviewText)
  235. {
  236.     $this->overviewText $overviewText;
  237.     return $this;
  238. }
  239. /**
  240. * Get AFASUrl - AFAS Url
  241. * @return \Pimcore\Model\DataObject\Data\Link|null
  242. */
  243. public function getAFASUrl(): ?\Pimcore\Model\DataObject\Data\Link
  244. {
  245.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  246.         $preValue $this->preGetValue("AFASUrl");
  247.         if ($preValue !== null) {
  248.             return $preValue;
  249.         }
  250.     }
  251.     $data $this->AFASUrl;
  252.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  253.         return $data->getPlain();
  254.     }
  255.     return $data;
  256. }
  257. /**
  258. * Set AFASUrl - AFAS Url
  259. * @param \Pimcore\Model\DataObject\Data\Link|null $AFASUrl
  260. * @return \Pimcore\Model\DataObject\Job
  261. */
  262. public function setAFASUrl(?\Pimcore\Model\DataObject\Data\Link $AFASUrl)
  263. {
  264.     $this->AFASUrl $AFASUrl;
  265.     return $this;
  266. }
  267. /**
  268. * Get intro - Intro
  269. * @return string|null
  270. */
  271. public function getIntro(): ?string
  272. {
  273.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  274.         $preValue $this->preGetValue("intro");
  275.         if ($preValue !== null) {
  276.             return $preValue;
  277.         }
  278.     }
  279.     $data $this->getClass()->getFieldDefinition("intro")->preGetData($this);
  280.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  281.         return $data->getPlain();
  282.     }
  283.     return $data;
  284. }
  285. /**
  286. * Set intro - Intro
  287. * @param string|null $intro
  288. * @return \Pimcore\Model\DataObject\Job
  289. */
  290. public function setIntro(?string $intro)
  291. {
  292.     $this->intro $intro;
  293.     return $this;
  294. }
  295. /**
  296. * Get function - Dit ga je doen
  297. * @return string|null
  298. */
  299. public function getFunction(): ?string
  300. {
  301.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  302.         $preValue $this->preGetValue("function");
  303.         if ($preValue !== null) {
  304.             return $preValue;
  305.         }
  306.     }
  307.     $data $this->getClass()->getFieldDefinition("function")->preGetData($this);
  308.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  309.         return $data->getPlain();
  310.     }
  311.     return $data;
  312. }
  313. /**
  314. * Set function - Dit ga je doen
  315. * @param string|null $function
  316. * @return \Pimcore\Model\DataObject\Job
  317. */
  318. public function setFunction(?string $function)
  319. {
  320.     $this->function $function;
  321.     return $this;
  322. }
  323. /**
  324. * Get aboutYou - Dit ben jij
  325. * @return string|null
  326. */
  327. public function getAboutYou(): ?string
  328. {
  329.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  330.         $preValue $this->preGetValue("aboutYou");
  331.         if ($preValue !== null) {
  332.             return $preValue;
  333.         }
  334.     }
  335.     $data $this->getClass()->getFieldDefinition("aboutYou")->preGetData($this);
  336.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  337.         return $data->getPlain();
  338.     }
  339.     return $data;
  340. }
  341. /**
  342. * Set aboutYou - Dit ben jij
  343. * @param string|null $aboutYou
  344. * @return \Pimcore\Model\DataObject\Job
  345. */
  346. public function setAboutYou(?string $aboutYou)
  347. {
  348.     $this->aboutYou $aboutYou;
  349.     return $this;
  350. }
  351. /**
  352. * Get vakteam - Vakteam
  353. * @return \Pimcore\Model\DataObject\Vakteam|null
  354. */
  355. public function getVakteam(): ?\Pimcore\Model\Element\AbstractElement
  356. {
  357.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  358.         $preValue $this->preGetValue("vakteam");
  359.         if ($preValue !== null) {
  360.             return $preValue;
  361.         }
  362.     }
  363.     $data $this->getClass()->getFieldDefinition("vakteam")->preGetData($this);
  364.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  365.         return $data->getPlain();
  366.     }
  367.     return $data;
  368. }
  369. /**
  370. * Set vakteam - Vakteam
  371. * @param \Pimcore\Model\DataObject\Vakteam|null $vakteam
  372. * @return \Pimcore\Model\DataObject\Job
  373. */
  374. public function setVakteam(?\Pimcore\Model\Element\AbstractElement $vakteam)
  375. {
  376.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
  377.     $fd $this->getClass()->getFieldDefinition("vakteam");
  378.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  379.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  380.     $currentData $this->getVakteam();
  381.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  382.     $isEqual $fd->isEqual($currentData$vakteam);
  383.     if (!$isEqual) {
  384.         $this->markFieldDirty("vakteam"true);
  385.     }
  386.     $this->vakteam $fd->preSetData($this$vakteam);
  387.     return $this;
  388. }
  389. /**
  390. * Get offer - Wij bieden
  391. * @return string|null
  392. */
  393. public function getOffer(): ?string
  394. {
  395.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  396.         $preValue $this->preGetValue("offer");
  397.         if ($preValue !== null) {
  398.             return $preValue;
  399.         }
  400.     }
  401.     $data $this->getClass()->getFieldDefinition("offer")->preGetData($this);
  402.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  403.         return $data->getPlain();
  404.     }
  405.     return $data;
  406. }
  407. /**
  408. * Set offer - Wij bieden
  409. * @param string|null $offer
  410. * @return \Pimcore\Model\DataObject\Job
  411. */
  412. public function setOffer(?string $offer)
  413. {
  414.     $this->offer $offer;
  415.     return $this;
  416. }
  417. /**
  418. * Get info - Informatie & Sollicitatie
  419. * @return string|null
  420. */
  421. public function getInfo(): ?string
  422. {
  423.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  424.         $preValue $this->preGetValue("info");
  425.         if ($preValue !== null) {
  426.             return $preValue;
  427.         }
  428.     }
  429.     $data $this->getClass()->getFieldDefinition("info")->preGetData($this);
  430.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  431.         return $data->getPlain();
  432.     }
  433.     return $data;
  434. }
  435. /**
  436. * Set info - Informatie & Sollicitatie
  437. * @param string|null $info
  438. * @return \Pimcore\Model\DataObject\Job
  439. */
  440. public function setInfo(?string $info)
  441. {
  442.     $this->info $info;
  443.     return $this;
  444. }
  445. /**
  446. * Get pdf - Pdf
  447. * @return \Pimcore\Model\Asset\Document|null
  448. */
  449. public function getPdf(): ?\Pimcore\Model\Element\AbstractElement
  450. {
  451.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  452.         $preValue $this->preGetValue("pdf");
  453.         if ($preValue !== null) {
  454.             return $preValue;
  455.         }
  456.     }
  457.     $data $this->getClass()->getFieldDefinition("pdf")->preGetData($this);
  458.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  459.         return $data->getPlain();
  460.     }
  461.     return $data;
  462. }
  463. /**
  464. * Set pdf - Pdf
  465. * @param \Pimcore\Model\Asset\Document|null $pdf
  466. * @return \Pimcore\Model\DataObject\Job
  467. */
  468. public function setPdf(?\Pimcore\Model\Element\AbstractElement $pdf)
  469. {
  470.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
  471.     $fd $this->getClass()->getFieldDefinition("pdf");
  472.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  473.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  474.     $currentData $this->getPdf();
  475.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  476.     $isEqual $fd->isEqual($currentData$pdf);
  477.     if (!$isEqual) {
  478.         $this->markFieldDirty("pdf"true);
  479.     }
  480.     $this->pdf $fd->preSetData($this$pdf);
  481.     return $this;
  482. }
  483. /**
  484. * Get closeDate - Close Date
  485. * @return \Carbon\Carbon|null
  486. */
  487. public function getCloseDate(): ?\Carbon\Carbon
  488. {
  489.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  490.         $preValue $this->preGetValue("closeDate");
  491.         if ($preValue !== null) {
  492.             return $preValue;
  493.         }
  494.     }
  495.     $data $this->closeDate;
  496.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  497.         return $data->getPlain();
  498.     }
  499.     return $data;
  500. }
  501. /**
  502. * Set closeDate - Close Date
  503. * @param \Carbon\Carbon|null $closeDate
  504. * @return \Pimcore\Model\DataObject\Job
  505. */
  506. public function setCloseDate(?\Carbon\Carbon $closeDate)
  507. {
  508.     $this->closeDate $closeDate;
  509.     return $this;
  510. }
  511. }