var/classes/DataObject/Ansprechpartner.php line 31

Open in your IDE?
  1. <?php
  2. /**
  3.  * Inheritance: no
  4.  * Variants: no
  5.  *
  6.  * Fields Summary:
  7.  * - firstname [input]
  8.  * - lastname [input]
  9.  * - position [input]
  10.  * - phone [input]
  11.  * - email [email]
  12.  * - photo [image]
  13.  */
  14. namespace Pimcore\Model\DataObject;
  15. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  16. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  17. /**
  18. * @method static \Pimcore\Model\DataObject\Ansprechpartner\Listing getList(array $config = [])
  19. * @method static \Pimcore\Model\DataObject\Ansprechpartner\Listing|\Pimcore\Model\DataObject\Ansprechpartner|null getByFirstname($value, $limit = 0, $offset = 0, $objectTypes = null)
  20. * @method static \Pimcore\Model\DataObject\Ansprechpartner\Listing|\Pimcore\Model\DataObject\Ansprechpartner|null getByLastname($value, $limit = 0, $offset = 0, $objectTypes = null)
  21. * @method static \Pimcore\Model\DataObject\Ansprechpartner\Listing|\Pimcore\Model\DataObject\Ansprechpartner|null getByPosition($value, $limit = 0, $offset = 0, $objectTypes = null)
  22. * @method static \Pimcore\Model\DataObject\Ansprechpartner\Listing|\Pimcore\Model\DataObject\Ansprechpartner|null getByPhone($value, $limit = 0, $offset = 0, $objectTypes = null)
  23. * @method static \Pimcore\Model\DataObject\Ansprechpartner\Listing|\Pimcore\Model\DataObject\Ansprechpartner|null getByEmail($value, $limit = 0, $offset = 0, $objectTypes = null)
  24. * @method static \Pimcore\Model\DataObject\Ansprechpartner\Listing|\Pimcore\Model\DataObject\Ansprechpartner|null getByPhoto($value, $limit = 0, $offset = 0, $objectTypes = null)
  25. */
  26. class Ansprechpartner extends Concrete
  27. {
  28. protected $o_classId "1";
  29. protected $o_className "ansprechpartner";
  30. protected $firstname;
  31. protected $lastname;
  32. protected $position;
  33. protected $phone;
  34. protected $email;
  35. protected $photo;
  36. /**
  37. * @param array $values
  38. * @return \Pimcore\Model\DataObject\Ansprechpartner
  39. */
  40. public static function create($values = array()) {
  41.     $object = new static();
  42.     $object->setValues($values);
  43.     return $object;
  44. }
  45. /**
  46. * Get firstname - Vorname
  47. * @return string|null
  48. */
  49. public function getFirstname(): ?string
  50. {
  51.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  52.         $preValue $this->preGetValue("firstname");
  53.         if ($preValue !== null) {
  54.             return $preValue;
  55.         }
  56.     }
  57.     $data $this->firstname;
  58.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  59.         return $data->getPlain();
  60.     }
  61.     return $data;
  62. }
  63. /**
  64. * Set firstname - Vorname
  65. * @param string|null $firstname
  66. * @return \Pimcore\Model\DataObject\Ansprechpartner
  67. */
  68. public function setFirstname(?string $firstname)
  69. {
  70.     $this->firstname $firstname;
  71.     return $this;
  72. }
  73. /**
  74. * Get lastname - Nachname
  75. * @return string|null
  76. */
  77. public function getLastname(): ?string
  78. {
  79.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  80.         $preValue $this->preGetValue("lastname");
  81.         if ($preValue !== null) {
  82.             return $preValue;
  83.         }
  84.     }
  85.     $data $this->lastname;
  86.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  87.         return $data->getPlain();
  88.     }
  89.     return $data;
  90. }
  91. /**
  92. * Set lastname - Nachname
  93. * @param string|null $lastname
  94. * @return \Pimcore\Model\DataObject\Ansprechpartner
  95. */
  96. public function setLastname(?string $lastname)
  97. {
  98.     $this->lastname $lastname;
  99.     return $this;
  100. }
  101. /**
  102. * Get position - Position
  103. * @return string|null
  104. */
  105. public function getPosition(): ?string
  106. {
  107.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  108.         $preValue $this->preGetValue("position");
  109.         if ($preValue !== null) {
  110.             return $preValue;
  111.         }
  112.     }
  113.     $data $this->position;
  114.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  115.         return $data->getPlain();
  116.     }
  117.     return $data;
  118. }
  119. /**
  120. * Set position - Position
  121. * @param string|null $position
  122. * @return \Pimcore\Model\DataObject\Ansprechpartner
  123. */
  124. public function setPosition(?string $position)
  125. {
  126.     $this->position $position;
  127.     return $this;
  128. }
  129. /**
  130. * Get phone - Telefon
  131. * @return string|null
  132. */
  133. public function getPhone(): ?string
  134. {
  135.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  136.         $preValue $this->preGetValue("phone");
  137.         if ($preValue !== null) {
  138.             return $preValue;
  139.         }
  140.     }
  141.     $data $this->phone;
  142.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  143.         return $data->getPlain();
  144.     }
  145.     return $data;
  146. }
  147. /**
  148. * Set phone - Telefon
  149. * @param string|null $phone
  150. * @return \Pimcore\Model\DataObject\Ansprechpartner
  151. */
  152. public function setPhone(?string $phone)
  153. {
  154.     $this->phone $phone;
  155.     return $this;
  156. }
  157. /**
  158. * Get email - E-Mail
  159. * @return string|null
  160. */
  161. public function getEmail(): ?string
  162. {
  163.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  164.         $preValue $this->preGetValue("email");
  165.         if ($preValue !== null) {
  166.             return $preValue;
  167.         }
  168.     }
  169.     $data $this->email;
  170.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  171.         return $data->getPlain();
  172.     }
  173.     return $data;
  174. }
  175. /**
  176. * Set email - E-Mail
  177. * @param string|null $email
  178. * @return \Pimcore\Model\DataObject\Ansprechpartner
  179. */
  180. public function setEmail(?string $email)
  181. {
  182.     $this->email $email;
  183.     return $this;
  184. }
  185. /**
  186. * Get photo - Foto
  187. * @return \Pimcore\Model\Asset\Image|null
  188. */
  189. public function getPhoto(): ?\Pimcore\Model\Asset\Image
  190. {
  191.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  192.         $preValue $this->preGetValue("photo");
  193.         if ($preValue !== null) {
  194.             return $preValue;
  195.         }
  196.     }
  197.     $data $this->photo;
  198.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  199.         return $data->getPlain();
  200.     }
  201.     return $data;
  202. }
  203. /**
  204. * Set photo - Foto
  205. * @param \Pimcore\Model\Asset\Image|null $photo
  206. * @return \Pimcore\Model\DataObject\Ansprechpartner
  207. */
  208. public function setPhoto(?\Pimcore\Model\Asset\Image $photo)
  209. {
  210.     $this->photo $photo;
  211.     return $this;
  212. }
  213. }