var/classes/DataObject/Job.php line 25

Open in your IDE?
  1. <?php
  2. /**
  3.  * Inheritance: no
  4.  * Variants: no
  5.  *
  6.  * Fields Summary:
  7.  * - headline [textarea]
  8.  * - intro [textarea]
  9.  * - text [wysiwyg]
  10.  */
  11. namespace Pimcore\Model\DataObject;
  12. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  13. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  14. /**
  15. * @method static \Pimcore\Model\DataObject\Job\Listing getList(array $config = [])
  16. * @method static \Pimcore\Model\DataObject\Job\Listing|\Pimcore\Model\DataObject\Job|null getByHeadline($value, $limit = 0, $offset = 0, $objectTypes = null)
  17. * @method static \Pimcore\Model\DataObject\Job\Listing|\Pimcore\Model\DataObject\Job|null getByIntro($value, $limit = 0, $offset = 0, $objectTypes = null)
  18. * @method static \Pimcore\Model\DataObject\Job\Listing|\Pimcore\Model\DataObject\Job|null getByText($value, $limit = 0, $offset = 0, $objectTypes = null)
  19. */
  20. class Job extends Concrete
  21. {
  22. protected $o_classId "Job";
  23. protected $o_className "Job";
  24. protected $headline;
  25. protected $intro;
  26. protected $text;
  27. /**
  28. * @param array $values
  29. * @return \Pimcore\Model\DataObject\Job
  30. */
  31. public static function create($values = array()) {
  32.     $object = new static();
  33.     $object->setValues($values);
  34.     return $object;
  35. }
  36. /**
  37. * Get headline - Headline
  38. * @return string|null
  39. */
  40. public function getHeadline(): ?string
  41. {
  42.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  43.         $preValue $this->preGetValue("headline");
  44.         if ($preValue !== null) {
  45.             return $preValue;
  46.         }
  47.     }
  48.     $data $this->headline;
  49.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  50.         return $data->getPlain();
  51.     }
  52.     return $data;
  53. }
  54. /**
  55. * Set headline - Headline
  56. * @param string|null $headline
  57. * @return \Pimcore\Model\DataObject\Job
  58. */
  59. public function setHeadline(?string $headline)
  60. {
  61.     $this->headline $headline;
  62.     return $this;
  63. }
  64. /**
  65. * Get intro - Intro
  66. * @return string|null
  67. */
  68. public function getIntro(): ?string
  69. {
  70.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  71.         $preValue $this->preGetValue("intro");
  72.         if ($preValue !== null) {
  73.             return $preValue;
  74.         }
  75.     }
  76.     $data $this->intro;
  77.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  78.         return $data->getPlain();
  79.     }
  80.     return $data;
  81. }
  82. /**
  83. * Set intro - Intro
  84. * @param string|null $intro
  85. * @return \Pimcore\Model\DataObject\Job
  86. */
  87. public function setIntro(?string $intro)
  88. {
  89.     $this->intro $intro;
  90.     return $this;
  91. }
  92. /**
  93. * Get text - Text
  94. * @return string|null
  95. */
  96. public function getText(): ?string
  97. {
  98.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  99.         $preValue $this->preGetValue("text");
  100.         if ($preValue !== null) {
  101.             return $preValue;
  102.         }
  103.     }
  104.     $data $this->getClass()->getFieldDefinition("text")->preGetData($this);
  105.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  106.         return $data->getPlain();
  107.     }
  108.     return $data;
  109. }
  110. /**
  111. * Set text - Text
  112. * @param string|null $text
  113. * @return \Pimcore\Model\DataObject\Job
  114. */
  115. public function setText(?string $text)
  116. {
  117.     $this->text $text;
  118.     return $this;
  119. }
  120. }