var/classes/DataObject/Team.php line 28

Open in your IDE?
  1. <?php
  2. /**
  3. * Inheritance: no
  4. * Variants: no
  5. Fields Summary:
  6. - image [image]
  7. - name [input]
  8. - position [input]
  9. - tel [input]
  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\Team\Listing getList(array $config = [])
  16. * @method static \Pimcore\Model\DataObject\Team\Listing|\Pimcore\Model\DataObject\Team|null getByImage($value, $limit = 0, $offset = 0, $objectTypes = null)
  17. * @method static \Pimcore\Model\DataObject\Team\Listing|\Pimcore\Model\DataObject\Team|null getByName($value, $limit = 0, $offset = 0, $objectTypes = null)
  18. * @method static \Pimcore\Model\DataObject\Team\Listing|\Pimcore\Model\DataObject\Team|null getByPosition($value, $limit = 0, $offset = 0, $objectTypes = null)
  19. * @method static \Pimcore\Model\DataObject\Team\Listing|\Pimcore\Model\DataObject\Team|null getByTel($value, $limit = 0, $offset = 0, $objectTypes = null)
  20. */
  21. class Team extends Concrete
  22. {
  23. protected $o_classId = "Team";
  24. protected $o_className = "Team";
  25. protected $image;
  26. protected $name;
  27. protected $position;
  28. protected $tel;
  29. /**
  30. * @param array $values
  31. * @return \Pimcore\Model\DataObject\Team
  32. */
  33. public static function create($values = array()) {
  34.     $object = new static();
  35.     $object->setValues($values);
  36.     return $object;
  37. }
  38. /**
  39. * Get image - Bild
  40. * @return \Pimcore\Model\Asset\Image|null
  41. */
  42. public function getImage(): ?\Pimcore\Model\Asset\Image
  43. {
  44.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  45.         $preValue = $this->preGetValue("image");
  46.         if ($preValue !== null) {
  47.             return $preValue;
  48.         }
  49.     }
  50.     $data = $this->image;
  51.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  52.         return $data->getPlain();
  53.     }
  54.     return $data;
  55. }
  56. /**
  57. * Set image - Bild
  58. * @param \Pimcore\Model\Asset\Image|null $image
  59. * @return \Pimcore\Model\DataObject\Team
  60. */
  61. public function setImage(?\Pimcore\Model\Asset\Image $image)
  62. {
  63.     $this->image = $image;
  64.     return $this;
  65. }
  66. /**
  67. * Get name - Name
  68. * @return string|null
  69. */
  70. public function getName(): ?string
  71. {
  72.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  73.         $preValue = $this->preGetValue("name");
  74.         if ($preValue !== null) {
  75.             return $preValue;
  76.         }
  77.     }
  78.     $data = $this->name;
  79.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  80.         return $data->getPlain();
  81.     }
  82.     return $data;
  83. }
  84. /**
  85. * Set name - Name
  86. * @param string|null $name
  87. * @return \Pimcore\Model\DataObject\Team
  88. */
  89. public function setName(?string $name)
  90. {
  91.     $this->name = $name;
  92.     return $this;
  93. }
  94. /**
  95. * Get position - Position
  96. * @return string|null
  97. */
  98. public function getPosition(): ?string
  99. {
  100.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  101.         $preValue = $this->preGetValue("position");
  102.         if ($preValue !== null) {
  103.             return $preValue;
  104.         }
  105.     }
  106.     $data = $this->position;
  107.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  108.         return $data->getPlain();
  109.     }
  110.     return $data;
  111. }
  112. /**
  113. * Set position - Position
  114. * @param string|null $position
  115. * @return \Pimcore\Model\DataObject\Team
  116. */
  117. public function setPosition(?string $position)
  118. {
  119.     $this->position = $position;
  120.     return $this;
  121. }
  122. /**
  123. * Get tel - Tel
  124. * @return string|null
  125. */
  126. public function getTel(): ?string
  127. {
  128.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  129.         $preValue = $this->preGetValue("tel");
  130.         if ($preValue !== null) {
  131.             return $preValue;
  132.         }
  133.     }
  134.     $data = $this->tel;
  135.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  136.         return $data->getPlain();
  137.     }
  138.     return $data;
  139. }
  140. /**
  141. * Set tel - Tel
  142. * @param string|null $tel
  143. * @return \Pimcore\Model\DataObject\Team
  144. */
  145. public function setTel(?string $tel)
  146. {
  147.     $this->tel = $tel;
  148.     return $this;
  149. }
  150. }