var/classes/DataObject/TeamPerson.php line 46

Open in your IDE?
  1. <?php
  2. /**
  3.  * Inheritance: no
  4.  * Variants: no
  5.  *
  6.  * Fields Summary:
  7.  * - name [input]
  8.  * - function [input]
  9.  * - phone [input]
  10.  * - email [input]
  11.  * - facebook [input]
  12.  * - linkedin [input]
  13.  * - xing [input]
  14.  * - instagram [input]
  15.  * - text [wysiwyg]
  16.  * - category [manyToManyRelation]
  17.  * - plant [booleanSelect]
  18.  * - teaserSize [select]
  19.  * - filter [checkbox]
  20.  * - portraitimage [image]
  21.  */
  22. namespace Pimcore\Model\DataObject;
  23. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  24. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  25. /**
  26. * @method static \Pimcore\Model\DataObject\TeamPerson\Listing getList(array $config = [])
  27. * @method static \Pimcore\Model\DataObject\TeamPerson\Listing|\Pimcore\Model\DataObject\TeamPerson|null getByName($value, $limit = 0, $offset = 0, $objectTypes = null)
  28. * @method static \Pimcore\Model\DataObject\TeamPerson\Listing|\Pimcore\Model\DataObject\TeamPerson|null getByFunction($value, $limit = 0, $offset = 0, $objectTypes = null)
  29. * @method static \Pimcore\Model\DataObject\TeamPerson\Listing|\Pimcore\Model\DataObject\TeamPerson|null getByPhone($value, $limit = 0, $offset = 0, $objectTypes = null)
  30. * @method static \Pimcore\Model\DataObject\TeamPerson\Listing|\Pimcore\Model\DataObject\TeamPerson|null getByEmail($value, $limit = 0, $offset = 0, $objectTypes = null)
  31. * @method static \Pimcore\Model\DataObject\TeamPerson\Listing|\Pimcore\Model\DataObject\TeamPerson|null getByFacebook($value, $limit = 0, $offset = 0, $objectTypes = null)
  32. * @method static \Pimcore\Model\DataObject\TeamPerson\Listing|\Pimcore\Model\DataObject\TeamPerson|null getByLinkedin($value, $limit = 0, $offset = 0, $objectTypes = null)
  33. * @method static \Pimcore\Model\DataObject\TeamPerson\Listing|\Pimcore\Model\DataObject\TeamPerson|null getByXing($value, $limit = 0, $offset = 0, $objectTypes = null)
  34. * @method static \Pimcore\Model\DataObject\TeamPerson\Listing|\Pimcore\Model\DataObject\TeamPerson|null getByInstagram($value, $limit = 0, $offset = 0, $objectTypes = null)
  35. * @method static \Pimcore\Model\DataObject\TeamPerson\Listing|\Pimcore\Model\DataObject\TeamPerson|null getByText($value, $limit = 0, $offset = 0, $objectTypes = null)
  36. * @method static \Pimcore\Model\DataObject\TeamPerson\Listing|\Pimcore\Model\DataObject\TeamPerson|null getByCategory($value, $limit = 0, $offset = 0, $objectTypes = null)
  37. * @method static \Pimcore\Model\DataObject\TeamPerson\Listing|\Pimcore\Model\DataObject\TeamPerson|null getByTeaserSize($value, $limit = 0, $offset = 0, $objectTypes = null)
  38. * @method static \Pimcore\Model\DataObject\TeamPerson\Listing|\Pimcore\Model\DataObject\TeamPerson|null getByFilter($value, $limit = 0, $offset = 0, $objectTypes = null)
  39. * @method static \Pimcore\Model\DataObject\TeamPerson\Listing|\Pimcore\Model\DataObject\TeamPerson|null getByPortraitimage($value, $limit = 0, $offset = 0, $objectTypes = null)
  40. */
  41. class TeamPerson extends Concrete
  42. {
  43. protected $o_classId "teamPerson";
  44. protected $o_className "teamPerson";
  45. protected $name;
  46. protected $function;
  47. protected $phone;
  48. protected $email;
  49. protected $facebook;
  50. protected $linkedin;
  51. protected $xing;
  52. protected $instagram;
  53. protected $text;
  54. protected $category;
  55. protected $plant;
  56. protected $teaserSize;
  57. protected $filter;
  58. protected $portraitimage;
  59. /**
  60. * @param array $values
  61. * @return \Pimcore\Model\DataObject\TeamPerson
  62. */
  63. public static function create($values = array()) {
  64.     $object = new static();
  65.     $object->setValues($values);
  66.     return $object;
  67. }
  68. /**
  69. * Get name - Name
  70. * @return string|null
  71. */
  72. public function getName(): ?string
  73. {
  74.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  75.         $preValue $this->preGetValue("name");
  76.         if ($preValue !== null) {
  77.             return $preValue;
  78.         }
  79.     }
  80.     $data $this->name;
  81.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  82.         return $data->getPlain();
  83.     }
  84.     return $data;
  85. }
  86. /**
  87. * Set name - Name
  88. * @param string|null $name
  89. * @return \Pimcore\Model\DataObject\TeamPerson
  90. */
  91. public function setName(?string $name)
  92. {
  93.     $this->name $name;
  94.     return $this;
  95. }
  96. /**
  97. * Get function - Funktion
  98. * @return string|null
  99. */
  100. public function getFunction(): ?string
  101. {
  102.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  103.         $preValue $this->preGetValue("function");
  104.         if ($preValue !== null) {
  105.             return $preValue;
  106.         }
  107.     }
  108.     $data $this->function;
  109.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  110.         return $data->getPlain();
  111.     }
  112.     return $data;
  113. }
  114. /**
  115. * Set function - Funktion
  116. * @param string|null $function
  117. * @return \Pimcore\Model\DataObject\TeamPerson
  118. */
  119. public function setFunction(?string $function)
  120. {
  121.     $this->function $function;
  122.     return $this;
  123. }
  124. /**
  125. * Get phone - Telefon
  126. * @return string|null
  127. */
  128. public function getPhone(): ?string
  129. {
  130.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  131.         $preValue $this->preGetValue("phone");
  132.         if ($preValue !== null) {
  133.             return $preValue;
  134.         }
  135.     }
  136.     $data $this->phone;
  137.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  138.         return $data->getPlain();
  139.     }
  140.     return $data;
  141. }
  142. /**
  143. * Set phone - Telefon
  144. * @param string|null $phone
  145. * @return \Pimcore\Model\DataObject\TeamPerson
  146. */
  147. public function setPhone(?string $phone)
  148. {
  149.     $this->phone $phone;
  150.     return $this;
  151. }
  152. /**
  153. * Get email - Email
  154. * @return string|null
  155. */
  156. public function getEmail(): ?string
  157. {
  158.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  159.         $preValue $this->preGetValue("email");
  160.         if ($preValue !== null) {
  161.             return $preValue;
  162.         }
  163.     }
  164.     $data $this->email;
  165.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  166.         return $data->getPlain();
  167.     }
  168.     return $data;
  169. }
  170. /**
  171. * Set email - Email
  172. * @param string|null $email
  173. * @return \Pimcore\Model\DataObject\TeamPerson
  174. */
  175. public function setEmail(?string $email)
  176. {
  177.     $this->email $email;
  178.     return $this;
  179. }
  180. /**
  181. * Get facebook - Facebook
  182. * @return string|null
  183. */
  184. public function getFacebook(): ?string
  185. {
  186.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  187.         $preValue $this->preGetValue("facebook");
  188.         if ($preValue !== null) {
  189.             return $preValue;
  190.         }
  191.     }
  192.     $data $this->facebook;
  193.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  194.         return $data->getPlain();
  195.     }
  196.     return $data;
  197. }
  198. /**
  199. * Set facebook - Facebook
  200. * @param string|null $facebook
  201. * @return \Pimcore\Model\DataObject\TeamPerson
  202. */
  203. public function setFacebook(?string $facebook)
  204. {
  205.     $this->facebook $facebook;
  206.     return $this;
  207. }
  208. /**
  209. * Get linkedin - URL linkedin
  210. * @return string|null
  211. */
  212. public function getLinkedin(): ?string
  213. {
  214.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  215.         $preValue $this->preGetValue("linkedin");
  216.         if ($preValue !== null) {
  217.             return $preValue;
  218.         }
  219.     }
  220.     $data $this->linkedin;
  221.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  222.         return $data->getPlain();
  223.     }
  224.     return $data;
  225. }
  226. /**
  227. * Set linkedin - URL linkedin
  228. * @param string|null $linkedin
  229. * @return \Pimcore\Model\DataObject\TeamPerson
  230. */
  231. public function setLinkedin(?string $linkedin)
  232. {
  233.     $this->linkedin $linkedin;
  234.     return $this;
  235. }
  236. /**
  237. * Get xing - URL xing
  238. * @return string|null
  239. */
  240. public function getXing(): ?string
  241. {
  242.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  243.         $preValue $this->preGetValue("xing");
  244.         if ($preValue !== null) {
  245.             return $preValue;
  246.         }
  247.     }
  248.     $data $this->xing;
  249.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  250.         return $data->getPlain();
  251.     }
  252.     return $data;
  253. }
  254. /**
  255. * Set xing - URL xing
  256. * @param string|null $xing
  257. * @return \Pimcore\Model\DataObject\TeamPerson
  258. */
  259. public function setXing(?string $xing)
  260. {
  261.     $this->xing $xing;
  262.     return $this;
  263. }
  264. /**
  265. * Get instagram - URL instagram
  266. * @return string|null
  267. */
  268. public function getInstagram(): ?string
  269. {
  270.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  271.         $preValue $this->preGetValue("instagram");
  272.         if ($preValue !== null) {
  273.             return $preValue;
  274.         }
  275.     }
  276.     $data $this->instagram;
  277.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  278.         return $data->getPlain();
  279.     }
  280.     return $data;
  281. }
  282. /**
  283. * Set instagram - URL instagram
  284. * @param string|null $instagram
  285. * @return \Pimcore\Model\DataObject\TeamPerson
  286. */
  287. public function setInstagram(?string $instagram)
  288. {
  289.     $this->instagram $instagram;
  290.     return $this;
  291. }
  292. /**
  293. * Get text - Text
  294. * @return string|null
  295. */
  296. public function getText(): ?string
  297. {
  298.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  299.         $preValue $this->preGetValue("text");
  300.         if ($preValue !== null) {
  301.             return $preValue;
  302.         }
  303.     }
  304.     $data $this->getClass()->getFieldDefinition("text")->preGetData($this);
  305.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  306.         return $data->getPlain();
  307.     }
  308.     return $data;
  309. }
  310. /**
  311. * Set text - Text
  312. * @param string|null $text
  313. * @return \Pimcore\Model\DataObject\TeamPerson
  314. */
  315. public function setText(?string $text)
  316. {
  317.     $this->text $text;
  318.     return $this;
  319. }
  320. /**
  321. * Get category - Category
  322. * @return \Pimcore\Model\DataObject\Category[]
  323. */
  324. public function getCategory(): array
  325. {
  326.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  327.         $preValue $this->preGetValue("category");
  328.         if ($preValue !== null) {
  329.             return $preValue;
  330.         }
  331.     }
  332.     $data $this->getClass()->getFieldDefinition("category")->preGetData($this);
  333.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  334.         return $data->getPlain();
  335.     }
  336.     return $data;
  337. }
  338. /**
  339. * Set category - Category
  340. * @param \Pimcore\Model\DataObject\Category[] $category
  341. * @return \Pimcore\Model\DataObject\TeamPerson
  342. */
  343. public function setCategory(?array $category)
  344. {
  345.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyRelation $fd */
  346.     $fd $this->getClass()->getFieldDefinition("category");
  347.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  348.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  349.     $currentData $this->getCategory();
  350.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  351.     $isEqual $fd->isEqual($currentData$category);
  352.     if (!$isEqual) {
  353.         $this->markFieldDirty("category"true);
  354.     }
  355.     $this->category $fd->preSetData($this$category);
  356.     return $this;
  357. }
  358. /**
  359. * Get plant - Plant
  360. * @return bool|null
  361. */
  362. public function getPlant(): ?bool
  363. {
  364.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  365.         $preValue $this->preGetValue("plant");
  366.         if ($preValue !== null) {
  367.             return $preValue;
  368.         }
  369.     }
  370.     $data $this->plant;
  371.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  372.         return $data->getPlain();
  373.     }
  374.     return $data;
  375. }
  376. /**
  377. * Set plant - Plant
  378. * @param bool|null $plant
  379. * @return \Pimcore\Model\DataObject\TeamPerson
  380. */
  381. public function setPlant(?bool $plant)
  382. {
  383.     $this->plant $plant;
  384.     return $this;
  385. }
  386. /**
  387. * Get teaserSize - Teaser Size
  388. * @return string|null
  389. */
  390. public function getTeaserSize(): ?string
  391. {
  392.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  393.         $preValue $this->preGetValue("teaserSize");
  394.         if ($preValue !== null) {
  395.             return $preValue;
  396.         }
  397.     }
  398.     $data $this->teaserSize;
  399.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  400.         return $data->getPlain();
  401.     }
  402.     return $data;
  403. }
  404. /**
  405. * Set teaserSize - Teaser Size
  406. * @param string|null $teaserSize
  407. * @return \Pimcore\Model\DataObject\TeamPerson
  408. */
  409. public function setTeaserSize(?string $teaserSize)
  410. {
  411.     $this->teaserSize $teaserSize;
  412.     return $this;
  413. }
  414. /**
  415. * Get filter - Filter
  416. * @return bool|null
  417. */
  418. public function getFilter(): ?bool
  419. {
  420.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  421.         $preValue $this->preGetValue("filter");
  422.         if ($preValue !== null) {
  423.             return $preValue;
  424.         }
  425.     }
  426.     $data $this->filter;
  427.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  428.         return $data->getPlain();
  429.     }
  430.     return $data;
  431. }
  432. /**
  433. * Set filter - Filter
  434. * @param bool|null $filter
  435. * @return \Pimcore\Model\DataObject\TeamPerson
  436. */
  437. public function setFilter(?bool $filter)
  438. {
  439.     $this->filter $filter;
  440.     return $this;
  441. }
  442. /**
  443. * Get portraitimage - Portraitimage
  444. * @return \Pimcore\Model\Asset\Image|null
  445. */
  446. public function getPortraitimage(): ?\Pimcore\Model\Asset\Image
  447. {
  448.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  449.         $preValue $this->preGetValue("portraitimage");
  450.         if ($preValue !== null) {
  451.             return $preValue;
  452.         }
  453.     }
  454.     $data $this->portraitimage;
  455.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  456.         return $data->getPlain();
  457.     }
  458.     return $data;
  459. }
  460. /**
  461. * Set portraitimage - Portraitimage
  462. * @param \Pimcore\Model\Asset\Image|null $portraitimage
  463. * @return \Pimcore\Model\DataObject\TeamPerson
  464. */
  465. public function setPortraitimage(?\Pimcore\Model\Asset\Image $portraitimage)
  466. {
  467.     $this->portraitimage $portraitimage;
  468.     return $this;
  469. }
  470. }