var/classes/DataObject/Geschichte.php line 23

Open in your IDE?
  1. <?php
  2. /**
  3.  * Inheritance: no
  4.  * Variants: no
  5.  *
  6.  * Fields Summary:
  7.  * - year [input]
  8.  * - text [textarea]
  9.  */
  10. namespace Pimcore\Model\DataObject;
  11. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  12. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  13. /**
  14. * @method static \Pimcore\Model\DataObject\Geschichte\Listing getList(array $config = [])
  15. * @method static \Pimcore\Model\DataObject\Geschichte\Listing|\Pimcore\Model\DataObject\Geschichte|null getByYear($value, $limit = 0, $offset = 0, $objectTypes = null)
  16. * @method static \Pimcore\Model\DataObject\Geschichte\Listing|\Pimcore\Model\DataObject\Geschichte|null getByText($value, $limit = 0, $offset = 0, $objectTypes = null)
  17. */
  18. class Geschichte extends Concrete
  19. {
  20. protected $o_classId "Geschichte";
  21. protected $o_className "Geschichte";
  22. protected $year;
  23. protected $text;
  24. /**
  25. * @param array $values
  26. * @return \Pimcore\Model\DataObject\Geschichte
  27. */
  28. public static function create($values = array()) {
  29.     $object = new static();
  30.     $object->setValues($values);
  31.     return $object;
  32. }
  33. /**
  34. * Get year - Year
  35. * @return string|null
  36. */
  37. public function getYear(): ?string
  38. {
  39.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  40.         $preValue $this->preGetValue("year");
  41.         if ($preValue !== null) {
  42.             return $preValue;
  43.         }
  44.     }
  45.     $data $this->year;
  46.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  47.         return $data->getPlain();
  48.     }
  49.     return $data;
  50. }
  51. /**
  52. * Set year - Year
  53. * @param string|null $year
  54. * @return \Pimcore\Model\DataObject\Geschichte
  55. */
  56. public function setYear(?string $year)
  57. {
  58.     $this->year $year;
  59.     return $this;
  60. }
  61. /**
  62. * Get text - Text
  63. * @return string|null
  64. */
  65. public function getText(): ?string
  66. {
  67.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  68.         $preValue $this->preGetValue("text");
  69.         if ($preValue !== null) {
  70.             return $preValue;
  71.         }
  72.     }
  73.     $data $this->text;
  74.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  75.         return $data->getPlain();
  76.     }
  77.     return $data;
  78. }
  79. /**
  80. * Set text - Text
  81. * @param string|null $text
  82. * @return \Pimcore\Model\DataObject\Geschichte
  83. */
  84. public function setText(?string $text)
  85. {
  86.     $this->text $text;
  87.     return $this;
  88. }
  89. }