var/classes/DataObject/Contact.php line 37

Open in your IDE?
  1. <?php
  2. /**
  3.  * Inheritance: no
  4.  * Variants: no
  5.  *
  6.  * Fields Summary:
  7.  * - email [input]
  8.  * - firstname [input]
  9.  * - lastname [input]
  10.  * - subject [input]
  11.  * - mobile [input]
  12.  * - message [textarea]
  13.  * - platform [select]
  14.  * - technicalData [textarea]
  15.  * - hiddenData [textarea]
  16.  */
  17. namespace Pimcore\Model\DataObject;
  18. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  19. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  20. /**
  21. * @method static \Pimcore\Model\DataObject\Contact\Listing getList(array $config = [])
  22. * @method static \Pimcore\Model\DataObject\Contact\Listing|\Pimcore\Model\DataObject\Contact|null getByEmail($value, $limit = 0, $offset = 0, $objectTypes = null)
  23. * @method static \Pimcore\Model\DataObject\Contact\Listing|\Pimcore\Model\DataObject\Contact|null getByFirstname($value, $limit = 0, $offset = 0, $objectTypes = null)
  24. * @method static \Pimcore\Model\DataObject\Contact\Listing|\Pimcore\Model\DataObject\Contact|null getByLastname($value, $limit = 0, $offset = 0, $objectTypes = null)
  25. * @method static \Pimcore\Model\DataObject\Contact\Listing|\Pimcore\Model\DataObject\Contact|null getBySubject($value, $limit = 0, $offset = 0, $objectTypes = null)
  26. * @method static \Pimcore\Model\DataObject\Contact\Listing|\Pimcore\Model\DataObject\Contact|null getByMobile($value, $limit = 0, $offset = 0, $objectTypes = null)
  27. * @method static \Pimcore\Model\DataObject\Contact\Listing|\Pimcore\Model\DataObject\Contact|null getByMessage($value, $limit = 0, $offset = 0, $objectTypes = null)
  28. * @method static \Pimcore\Model\DataObject\Contact\Listing|\Pimcore\Model\DataObject\Contact|null getByPlatform($value, $limit = 0, $offset = 0, $objectTypes = null)
  29. * @method static \Pimcore\Model\DataObject\Contact\Listing|\Pimcore\Model\DataObject\Contact|null getByTechnicalData($value, $limit = 0, $offset = 0, $objectTypes = null)
  30. * @method static \Pimcore\Model\DataObject\Contact\Listing|\Pimcore\Model\DataObject\Contact|null getByHiddenData($value, $limit = 0, $offset = 0, $objectTypes = null)
  31. */
  32. class Contact extends \App\Model\Contact
  33. {
  34. protected $o_classId "10";
  35. protected $o_className "Contact";
  36. protected $email;
  37. protected $firstname;
  38. protected $lastname;
  39. protected $subject;
  40. protected $mobile;
  41. protected $message;
  42. protected $platform;
  43. protected $technicalData;
  44. protected $hiddenData;
  45. /**
  46. * @param array $values
  47. * @return \Pimcore\Model\DataObject\Contact
  48. */
  49. public static function create($values = array()) {
  50.     $object = new static();
  51.     $object->setValues($values);
  52.     return $object;
  53. }
  54. /**
  55. * Get email - E-mail cím
  56. * @return string|null
  57. */
  58. public function getEmail(): ?string
  59. {
  60.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  61.         $preValue $this->preGetValue("email");
  62.         if ($preValue !== null) {
  63.             return $preValue;
  64.         }
  65.     }
  66.     $data $this->email;
  67.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  68.         return $data->getPlain();
  69.     }
  70.     return $data;
  71. }
  72. /**
  73. * Set email - E-mail cím
  74. * @param string|null $email
  75. * @return \Pimcore\Model\DataObject\Contact
  76. */
  77. public function setEmail(?string $email)
  78. {
  79.     $this->email $email;
  80.     return $this;
  81. }
  82. /**
  83. * Get firstname - Keresztnév
  84. * @return string|null
  85. */
  86. public function getFirstname(): ?string
  87. {
  88.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  89.         $preValue $this->preGetValue("firstname");
  90.         if ($preValue !== null) {
  91.             return $preValue;
  92.         }
  93.     }
  94.     $data $this->firstname;
  95.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  96.         return $data->getPlain();
  97.     }
  98.     return $data;
  99. }
  100. /**
  101. * Set firstname - Keresztnév
  102. * @param string|null $firstname
  103. * @return \Pimcore\Model\DataObject\Contact
  104. */
  105. public function setFirstname(?string $firstname)
  106. {
  107.     $this->firstname $firstname;
  108.     return $this;
  109. }
  110. /**
  111. * Get lastname - Vezetéknév
  112. * @return string|null
  113. */
  114. public function getLastname(): ?string
  115. {
  116.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  117.         $preValue $this->preGetValue("lastname");
  118.         if ($preValue !== null) {
  119.             return $preValue;
  120.         }
  121.     }
  122.     $data $this->lastname;
  123.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  124.         return $data->getPlain();
  125.     }
  126.     return $data;
  127. }
  128. /**
  129. * Set lastname - Vezetéknév
  130. * @param string|null $lastname
  131. * @return \Pimcore\Model\DataObject\Contact
  132. */
  133. public function setLastname(?string $lastname)
  134. {
  135.     $this->lastname $lastname;
  136.     return $this;
  137. }
  138. /**
  139. * Get subject - Tárgy
  140. * @return string|null
  141. */
  142. public function getSubject(): ?string
  143. {
  144.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  145.         $preValue $this->preGetValue("subject");
  146.         if ($preValue !== null) {
  147.             return $preValue;
  148.         }
  149.     }
  150.     $data $this->subject;
  151.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  152.         return $data->getPlain();
  153.     }
  154.     return $data;
  155. }
  156. /**
  157. * Set subject - Tárgy
  158. * @param string|null $subject
  159. * @return \Pimcore\Model\DataObject\Contact
  160. */
  161. public function setSubject(?string $subject)
  162. {
  163.     $this->subject $subject;
  164.     return $this;
  165. }
  166. /**
  167. * Get mobile - Telefonszám
  168. * @return string|null
  169. */
  170. public function getMobile(): ?string
  171. {
  172.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  173.         $preValue $this->preGetValue("mobile");
  174.         if ($preValue !== null) {
  175.             return $preValue;
  176.         }
  177.     }
  178.     $data $this->mobile;
  179.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  180.         return $data->getPlain();
  181.     }
  182.     return $data;
  183. }
  184. /**
  185. * Set mobile - Telefonszám
  186. * @param string|null $mobile
  187. * @return \Pimcore\Model\DataObject\Contact
  188. */
  189. public function setMobile(?string $mobile)
  190. {
  191.     $this->mobile $mobile;
  192.     return $this;
  193. }
  194. /**
  195. * Get message - Üzenet
  196. * @return string|null
  197. */
  198. public function getMessage(): ?string
  199. {
  200.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  201.         $preValue $this->preGetValue("message");
  202.         if ($preValue !== null) {
  203.             return $preValue;
  204.         }
  205.     }
  206.     $data $this->message;
  207.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  208.         return $data->getPlain();
  209.     }
  210.     return $data;
  211. }
  212. /**
  213. * Set message - Üzenet
  214. * @param string|null $message
  215. * @return \Pimcore\Model\DataObject\Contact
  216. */
  217. public function setMessage(?string $message)
  218. {
  219.     $this->message $message;
  220.     return $this;
  221. }
  222. /**
  223. * Get platform - Platform
  224. * @return string|null
  225. */
  226. public function getPlatform(): ?string
  227. {
  228.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  229.         $preValue $this->preGetValue("platform");
  230.         if ($preValue !== null) {
  231.             return $preValue;
  232.         }
  233.     }
  234.     $data $this->platform;
  235.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  236.         return $data->getPlain();
  237.     }
  238.     return $data;
  239. }
  240. /**
  241. * Set platform - Platform
  242. * @param string|null $platform
  243. * @return \Pimcore\Model\DataObject\Contact
  244. */
  245. public function setPlatform(?string $platform)
  246. {
  247.     $this->platform $platform;
  248.     return $this;
  249. }
  250. /**
  251. * Get technicalData - Technical Data
  252. * @return string|null
  253. */
  254. public function getTechnicalData(): ?string
  255. {
  256.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  257.         $preValue $this->preGetValue("technicalData");
  258.         if ($preValue !== null) {
  259.             return $preValue;
  260.         }
  261.     }
  262.     $data $this->technicalData;
  263.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  264.         return $data->getPlain();
  265.     }
  266.     return $data;
  267. }
  268. /**
  269. * Set technicalData - Technical Data
  270. * @param string|null $technicalData
  271. * @return \Pimcore\Model\DataObject\Contact
  272. */
  273. public function setTechnicalData(?string $technicalData)
  274. {
  275.     $this->technicalData $technicalData;
  276.     return $this;
  277. }
  278. /**
  279. * Get hiddenData - Hidden Data
  280. * @return string|null
  281. */
  282. public function getHiddenData(): ?string
  283. {
  284.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  285.         $preValue $this->preGetValue("hiddenData");
  286.         if ($preValue !== null) {
  287.             return $preValue;
  288.         }
  289.     }
  290.     $data $this->hiddenData;
  291.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  292.         return $data->getPlain();
  293.     }
  294.     return $data;
  295. }
  296. /**
  297. * Set hiddenData - Hidden Data
  298. * @param string|null $hiddenData
  299. * @return \Pimcore\Model\DataObject\Contact
  300. */
  301. public function setHiddenData(?string $hiddenData)
  302. {
  303.     $this->hiddenData $hiddenData;
  304.     return $this;
  305. }
  306. }