var/classes/DataObject/Events.php line 276

Open in your IDE?
  1. <?php
  2. /**
  3. * Inheritance: no
  4. * Variants: no
  5. Fields Summary:
  6. - url [input]
  7. - localizedfields [localizedfields]
  8. -- e_name [input]
  9. -- e_description [textarea]
  10. -- e_slider_description [textarea]
  11. -- location [input]
  12. -- dateandtime [input]
  13. -- meta_title [input]
  14. -- meta_description [textarea]
  15. -- webinarImage [image]
  16. -- webinarLink [link]
  17. -- webinarTitle [input]
  18. - date_time [datetime]
  19. - featured [booleanSelect]
  20. - event_image [image]
  21. - eventImageAr [image]
  22. - e_images [imageGallery]
  23. - videos [block]
  24. -- video [video]
  25. - similar_events [manyToManyObjectRelation]
  26. - show [checkbox]
  27. - detailListBlock [block]
  28. -- localizedfields [localizedfields]
  29. --- name [input]
  30. */
  31. namespace Pimcore\Model\DataObject;
  32. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  33. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  34. /**
  35. * @method static \Pimcore\Model\DataObject\Events\Listing getList(array $config = [])
  36. * @method static \Pimcore\Model\DataObject\Events\Listing|\Pimcore\Model\DataObject\Events|null getByUrl($value, $limit = 0, $offset = 0, $objectTypes = null)
  37. * @method static \Pimcore\Model\DataObject\Events\Listing|\Pimcore\Model\DataObject\Events|null getByLocalizedfields($field, $value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  38. * @method static \Pimcore\Model\DataObject\Events\Listing|\Pimcore\Model\DataObject\Events|null getByE_name($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  39. * @method static \Pimcore\Model\DataObject\Events\Listing|\Pimcore\Model\DataObject\Events|null getByE_description($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  40. * @method static \Pimcore\Model\DataObject\Events\Listing|\Pimcore\Model\DataObject\Events|null getByE_slider_description($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  41. * @method static \Pimcore\Model\DataObject\Events\Listing|\Pimcore\Model\DataObject\Events|null getByLocation($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  42. * @method static \Pimcore\Model\DataObject\Events\Listing|\Pimcore\Model\DataObject\Events|null getByDateandtime($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  43. * @method static \Pimcore\Model\DataObject\Events\Listing|\Pimcore\Model\DataObject\Events|null getByMeta_title($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  44. * @method static \Pimcore\Model\DataObject\Events\Listing|\Pimcore\Model\DataObject\Events|null getByMeta_description($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  45. * @method static \Pimcore\Model\DataObject\Events\Listing|\Pimcore\Model\DataObject\Events|null getByWebinarImage($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  46. * @method static \Pimcore\Model\DataObject\Events\Listing|\Pimcore\Model\DataObject\Events|null getByWebinarLink($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  47. * @method static \Pimcore\Model\DataObject\Events\Listing|\Pimcore\Model\DataObject\Events|null getByWebinarTitle($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  48. * @method static \Pimcore\Model\DataObject\Events\Listing|\Pimcore\Model\DataObject\Events|null getByDate_time($value, $limit = 0, $offset = 0, $objectTypes = null)
  49. * @method static \Pimcore\Model\DataObject\Events\Listing|\Pimcore\Model\DataObject\Events|null getByEvent_image($value, $limit = 0, $offset = 0, $objectTypes = null)
  50. * @method static \Pimcore\Model\DataObject\Events\Listing|\Pimcore\Model\DataObject\Events|null getByEventImageAr($value, $limit = 0, $offset = 0, $objectTypes = null)
  51. * @method static \Pimcore\Model\DataObject\Events\Listing|\Pimcore\Model\DataObject\Events|null getBySimilar_events($value, $limit = 0, $offset = 0, $objectTypes = null)
  52. * @method static \Pimcore\Model\DataObject\Events\Listing|\Pimcore\Model\DataObject\Events|null getByShow($value, $limit = 0, $offset = 0, $objectTypes = null)
  53. */
  54. class Events extends Concrete
  55. {
  56. protected $o_classId "events";
  57. protected $o_className "events";
  58. protected $url;
  59. protected $localizedfields;
  60. protected $date_time;
  61. protected $featured;
  62. protected $event_image;
  63. protected $eventImageAr;
  64. protected $e_images;
  65. protected $videos;
  66. protected $similar_events;
  67. protected $show;
  68. protected $detailListBlock;
  69. /**
  70. * @param array $values
  71. * @return \Pimcore\Model\DataObject\Events
  72. */
  73. public static function create($values = array()) {
  74.     $object = new static();
  75.     $object->setValues($values);
  76.     return $object;
  77. }
  78. /**
  79. * Get url - url
  80. * @return string|null
  81. */
  82. public function getUrl(): ?string
  83. {
  84.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  85.         $preValue $this->preGetValue("url");
  86.         if ($preValue !== null) {
  87.             return $preValue;
  88.         }
  89.     }
  90.     $data $this->url;
  91.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  92.         return $data->getPlain();
  93.     }
  94.     return $data;
  95. }
  96. /**
  97. * Set url - url
  98. * @param string|null $url
  99. * @return \Pimcore\Model\DataObject\Events
  100. */
  101. public function setUrl(?string $url)
  102. {
  103.     $this->url $url;
  104.     return $this;
  105. }
  106. /**
  107. * Get localizedfields - 
  108. * @return \Pimcore\Model\DataObject\Localizedfield|null
  109. */
  110. public function getLocalizedfields(): ?\Pimcore\Model\DataObject\Localizedfield
  111. {
  112.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  113.         $preValue $this->preGetValue("localizedfields");
  114.         if ($preValue !== null) {
  115.             return $preValue;
  116.         }
  117.     }
  118.     $data $this->getClass()->getFieldDefinition("localizedfields")->preGetData($this);
  119.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  120.         return $data->getPlain();
  121.     }
  122.     return $data;
  123. }
  124. /**
  125. * Get e_name - Event Name
  126. * @return string|null
  127. */
  128. public function getE_name($language null): ?string
  129. {
  130.     $data $this->getLocalizedfields()->getLocalizedValue("e_name"$language);
  131.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  132.         $preValue $this->preGetValue("e_name");
  133.         if ($preValue !== null) {
  134.             return $preValue;
  135.         }
  136.     }
  137.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  138.         return $data->getPlain();
  139.     }
  140.     return $data;
  141. }
  142. /**
  143. * Get e_description - Event Description
  144. * @return string|null
  145. */
  146. public function getE_description($language null): ?string
  147. {
  148.     $data $this->getLocalizedfields()->getLocalizedValue("e_description"$language);
  149.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  150.         $preValue $this->preGetValue("e_description");
  151.         if ($preValue !== null) {
  152.             return $preValue;
  153.         }
  154.     }
  155.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  156.         return $data->getPlain();
  157.     }
  158.     return $data;
  159. }
  160. /**
  161. * Get e_slider_description - Event Slider Description
  162. * @return string|null
  163. */
  164. public function getE_slider_description($language null): ?string
  165. {
  166.     $data $this->getLocalizedfields()->getLocalizedValue("e_slider_description"$language);
  167.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  168.         $preValue $this->preGetValue("e_slider_description");
  169.         if ($preValue !== null) {
  170.             return $preValue;
  171.         }
  172.     }
  173.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  174.         return $data->getPlain();
  175.     }
  176.     return $data;
  177. }
  178. /**
  179. * Get location - Location
  180. * @return string|null
  181. */
  182. public function getLocation($language null): ?string
  183. {
  184.     $data $this->getLocalizedfields()->getLocalizedValue("location"$language);
  185.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  186.         $preValue $this->preGetValue("location");
  187.         if ($preValue !== null) {
  188.             return $preValue;
  189.         }
  190.     }
  191.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  192.         return $data->getPlain();
  193.     }
  194.     return $data;
  195. }
  196. /**
  197. * Get dateandtime - Date
  198. * @return string|null
  199. */
  200. public function getDateandtime($language null): ?string
  201. {
  202.     $data $this->getLocalizedfields()->getLocalizedValue("dateandtime"$language);
  203.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  204.         $preValue $this->preGetValue("dateandtime");
  205.         if ($preValue !== null) {
  206.             return $preValue;
  207.         }
  208.     }
  209.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  210.         return $data->getPlain();
  211.     }
  212.     return $data;
  213. }
  214. /**
  215. * Get meta_title - Meta Title
  216. * @return string|null
  217. */
  218. public function getMeta_title($language null): ?string
  219. {
  220.     $data $this->getLocalizedfields()->getLocalizedValue("meta_title"$language);
  221.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  222.         $preValue $this->preGetValue("meta_title");
  223.         if ($preValue !== null) {
  224.             return $preValue;
  225.         }
  226.     }
  227.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  228.         return $data->getPlain();
  229.     }
  230.     return $data;
  231. }
  232. /**
  233. * Get meta_description - Meta Description
  234. * @return string|null
  235. */
  236. public function getMeta_description($language null): ?string
  237. {
  238.     $data $this->getLocalizedfields()->getLocalizedValue("meta_description"$language);
  239.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  240.         $preValue $this->preGetValue("meta_description");
  241.         if ($preValue !== null) {
  242.             return $preValue;
  243.         }
  244.     }
  245.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  246.         return $data->getPlain();
  247.     }
  248.     return $data;
  249. }
  250. /**
  251. * Get webinarImage - Webinar Image
  252. * @return \Pimcore\Model\Asset\Image|null
  253. */
  254. public function getWebinarImage($language null): ?\Pimcore\Model\Asset\Image
  255. {
  256.     $data $this->getLocalizedfields()->getLocalizedValue("webinarImage"$language);
  257.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  258.         $preValue $this->preGetValue("webinarImage");
  259.         if ($preValue !== null) {
  260.             return $preValue;
  261.         }
  262.     }
  263.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  264.         return $data->getPlain();
  265.     }
  266.     return $data;
  267. }
  268. /**
  269. * Get webinarLink - Webinar Link
  270. * @return \Pimcore\Model\DataObject\Data\Link|null
  271. */
  272. public function getWebinarLink($language null): ?\Pimcore\Model\DataObject\Data\Link
  273. {
  274.     $data $this->getLocalizedfields()->getLocalizedValue("webinarLink"$language);
  275.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  276.         $preValue $this->preGetValue("webinarLink");
  277.         if ($preValue !== null) {
  278.             return $preValue;
  279.         }
  280.     }
  281.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  282.         return $data->getPlain();
  283.     }
  284.     return $data;
  285. }
  286. /**
  287. * Get webinarTitle - Webinar Title
  288. * @return string|null
  289. */
  290. public function getWebinarTitle($language null): ?string
  291. {
  292.     $data $this->getLocalizedfields()->getLocalizedValue("webinarTitle"$language);
  293.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  294.         $preValue $this->preGetValue("webinarTitle");
  295.         if ($preValue !== null) {
  296.             return $preValue;
  297.         }
  298.     }
  299.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  300.         return $data->getPlain();
  301.     }
  302.     return $data;
  303. }
  304. /**
  305. * Set localizedfields - 
  306. * @param \Pimcore\Model\DataObject\Localizedfield|null $localizedfields
  307. * @return \Pimcore\Model\DataObject\Events
  308. */
  309. public function setLocalizedfields(?\Pimcore\Model\DataObject\Localizedfield $localizedfields)
  310. {
  311.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  312.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  313.     $currentData $this->getLocalizedfields();
  314.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  315.     $this->markFieldDirty("localizedfields"true);
  316.     $this->localizedfields $localizedfields;
  317.     return $this;
  318. }
  319. /**
  320. * Set e_name - Event Name
  321. * @param string|null $e_name
  322. * @return \Pimcore\Model\DataObject\Events
  323. */
  324. public function setE_name (?string $e_name$language null)
  325. {
  326.     $isEqual false;
  327.     $this->getLocalizedfields()->setLocalizedValue("e_name"$e_name$language, !$isEqual);
  328.     return $this;
  329. }
  330. /**
  331. * Set e_description - Event Description
  332. * @param string|null $e_description
  333. * @return \Pimcore\Model\DataObject\Events
  334. */
  335. public function setE_description (?string $e_description$language null)
  336. {
  337.     $isEqual false;
  338.     $this->getLocalizedfields()->setLocalizedValue("e_description"$e_description$language, !$isEqual);
  339.     return $this;
  340. }
  341. /**
  342. * Set e_slider_description - Event Slider Description
  343. * @param string|null $e_slider_description
  344. * @return \Pimcore\Model\DataObject\Events
  345. */
  346. public function setE_slider_description (?string $e_slider_description$language null)
  347. {
  348.     $isEqual false;
  349.     $this->getLocalizedfields()->setLocalizedValue("e_slider_description"$e_slider_description$language, !$isEqual);
  350.     return $this;
  351. }
  352. /**
  353. * Set location - Location
  354. * @param string|null $location
  355. * @return \Pimcore\Model\DataObject\Events
  356. */
  357. public function setLocation (?string $location$language null)
  358. {
  359.     $isEqual false;
  360.     $this->getLocalizedfields()->setLocalizedValue("location"$location$language, !$isEqual);
  361.     return $this;
  362. }
  363. /**
  364. * Set dateandtime - Date
  365. * @param string|null $dateandtime
  366. * @return \Pimcore\Model\DataObject\Events
  367. */
  368. public function setDateandtime (?string $dateandtime$language null)
  369. {
  370.     $isEqual false;
  371.     $this->getLocalizedfields()->setLocalizedValue("dateandtime"$dateandtime$language, !$isEqual);
  372.     return $this;
  373. }
  374. /**
  375. * Set meta_title - Meta Title
  376. * @param string|null $meta_title
  377. * @return \Pimcore\Model\DataObject\Events
  378. */
  379. public function setMeta_title (?string $meta_title$language null)
  380. {
  381.     $isEqual false;
  382.     $this->getLocalizedfields()->setLocalizedValue("meta_title"$meta_title$language, !$isEqual);
  383.     return $this;
  384. }
  385. /**
  386. * Set meta_description - Meta Description
  387. * @param string|null $meta_description
  388. * @return \Pimcore\Model\DataObject\Events
  389. */
  390. public function setMeta_description (?string $meta_description$language null)
  391. {
  392.     $isEqual false;
  393.     $this->getLocalizedfields()->setLocalizedValue("meta_description"$meta_description$language, !$isEqual);
  394.     return $this;
  395. }
  396. /**
  397. * Set webinarImage - Webinar Image
  398. * @param \Pimcore\Model\Asset\Image|null $webinarImage
  399. * @return \Pimcore\Model\DataObject\Events
  400. */
  401. public function setWebinarImage (?\Pimcore\Model\Asset\Image $webinarImage$language null)
  402. {
  403.     $isEqual false;
  404.     $this->getLocalizedfields()->setLocalizedValue("webinarImage"$webinarImage$language, !$isEqual);
  405.     return $this;
  406. }
  407. /**
  408. * Set webinarLink - Webinar Link
  409. * @param \Pimcore\Model\DataObject\Data\Link|null $webinarLink
  410. * @return \Pimcore\Model\DataObject\Events
  411. */
  412. public function setWebinarLink (?\Pimcore\Model\DataObject\Data\Link $webinarLink$language null)
  413. {
  414.     $isEqual false;
  415.     $this->getLocalizedfields()->setLocalizedValue("webinarLink"$webinarLink$language, !$isEqual);
  416.     return $this;
  417. }
  418. /**
  419. * Set webinarTitle - Webinar Title
  420. * @param string|null $webinarTitle
  421. * @return \Pimcore\Model\DataObject\Events
  422. */
  423. public function setWebinarTitle (?string $webinarTitle$language null)
  424. {
  425.     $isEqual false;
  426.     $this->getLocalizedfields()->setLocalizedValue("webinarTitle"$webinarTitle$language, !$isEqual);
  427.     return $this;
  428. }
  429. /**
  430. * Get date_time - Date and Time
  431. * @return \Carbon\Carbon|null
  432. */
  433. public function getDate_time(): ?\Carbon\Carbon
  434. {
  435.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  436.         $preValue $this->preGetValue("date_time");
  437.         if ($preValue !== null) {
  438.             return $preValue;
  439.         }
  440.     }
  441.     $data $this->date_time;
  442.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  443.         return $data->getPlain();
  444.     }
  445.     return $data;
  446. }
  447. /**
  448. * Set date_time - Date and Time
  449. * @param \Carbon\Carbon|null $date_time
  450. * @return \Pimcore\Model\DataObject\Events
  451. */
  452. public function setDate_time(?\Carbon\Carbon $date_time)
  453. {
  454.     $this->date_time $date_time;
  455.     return $this;
  456. }
  457. /**
  458. * Get featured - Featured Event
  459. * @return bool|null
  460. */
  461. public function getFeatured(): ?bool
  462. {
  463.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  464.         $preValue $this->preGetValue("featured");
  465.         if ($preValue !== null) {
  466.             return $preValue;
  467.         }
  468.     }
  469.     $data $this->featured;
  470.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  471.         return $data->getPlain();
  472.     }
  473.     return $data;
  474. }
  475. /**
  476. * Set featured - Featured Event
  477. * @param bool|null $featured
  478. * @return \Pimcore\Model\DataObject\Events
  479. */
  480. public function setFeatured(?bool $featured)
  481. {
  482.     $this->featured $featured;
  483.     return $this;
  484. }
  485. /**
  486. * Get event_image - Event Image
  487. * @return \Pimcore\Model\Asset\Image|null
  488. */
  489. public function getEvent_image(): ?\Pimcore\Model\Asset\Image
  490. {
  491.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  492.         $preValue $this->preGetValue("event_image");
  493.         if ($preValue !== null) {
  494.             return $preValue;
  495.         }
  496.     }
  497.     $data $this->event_image;
  498.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  499.         return $data->getPlain();
  500.     }
  501.     return $data;
  502. }
  503. /**
  504. * Set event_image - Event Image
  505. * @param \Pimcore\Model\Asset\Image|null $event_image
  506. * @return \Pimcore\Model\DataObject\Events
  507. */
  508. public function setEvent_image(?\Pimcore\Model\Asset\Image $event_image)
  509. {
  510.     $this->event_image $event_image;
  511.     return $this;
  512. }
  513. /**
  514. * Get eventImageAr - Event Image Ar
  515. * @return \Pimcore\Model\Asset\Image|null
  516. */
  517. public function getEventImageAr(): ?\Pimcore\Model\Asset\Image
  518. {
  519.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  520.         $preValue $this->preGetValue("eventImageAr");
  521.         if ($preValue !== null) {
  522.             return $preValue;
  523.         }
  524.     }
  525.     $data $this->eventImageAr;
  526.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  527.         return $data->getPlain();
  528.     }
  529.     return $data;
  530. }
  531. /**
  532. * Set eventImageAr - Event Image Ar
  533. * @param \Pimcore\Model\Asset\Image|null $eventImageAr
  534. * @return \Pimcore\Model\DataObject\Events
  535. */
  536. public function setEventImageAr(?\Pimcore\Model\Asset\Image $eventImageAr)
  537. {
  538.     $this->eventImageAr $eventImageAr;
  539.     return $this;
  540. }
  541. /**
  542. * Get e_images - Event Images
  543. * @return \Pimcore\Model\DataObject\Data\ImageGallery|null
  544. */
  545. public function getE_images(): ?\Pimcore\Model\DataObject\Data\ImageGallery
  546. {
  547.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  548.         $preValue $this->preGetValue("e_images");
  549.         if ($preValue !== null) {
  550.             return $preValue;
  551.         }
  552.     }
  553.     $data $this->e_images;
  554.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  555.         return $data->getPlain();
  556.     }
  557.     return $data;
  558. }
  559. /**
  560. * Set e_images - Event Images
  561. * @param \Pimcore\Model\DataObject\Data\ImageGallery|null $e_images
  562. * @return \Pimcore\Model\DataObject\Events
  563. */
  564. public function setE_images(?\Pimcore\Model\DataObject\Data\ImageGallery $e_images)
  565. {
  566.     $this->e_images $e_images;
  567.     return $this;
  568. }
  569. /**
  570. * Get videos - videos
  571. * @return \Pimcore\Model\DataObject\Data\BlockElement[][]
  572. */
  573. public function getVideos(): ?array
  574. {
  575.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  576.         $preValue $this->preGetValue("videos");
  577.         if ($preValue !== null) {
  578.             return $preValue;
  579.         }
  580.     }
  581.     $data $this->getClass()->getFieldDefinition("videos")->preGetData($this);
  582.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  583.         return $data->getPlain();
  584.     }
  585.     return $data;
  586. }
  587. /**
  588. * Set videos - videos
  589. * @param \Pimcore\Model\DataObject\Data\BlockElement[][] $videos
  590. * @return \Pimcore\Model\DataObject\Events
  591. */
  592. public function setVideos(?array $videos)
  593. {
  594.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Block $fd */
  595.     $fd $this->getClass()->getFieldDefinition("videos");
  596.     $this->videos $fd->preSetData($this$videos);
  597.     return $this;
  598. }
  599. /**
  600. * Get similar_events - Similar Events
  601. * @return \Pimcore\Model\DataObject\Events[]
  602. */
  603. public function getSimilar_events(): array
  604. {
  605.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  606.         $preValue $this->preGetValue("similar_events");
  607.         if ($preValue !== null) {
  608.             return $preValue;
  609.         }
  610.     }
  611.     $data $this->getClass()->getFieldDefinition("similar_events")->preGetData($this);
  612.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  613.         return $data->getPlain();
  614.     }
  615.     return $data;
  616. }
  617. /**
  618. * Set similar_events - Similar Events
  619. * @param \Pimcore\Model\DataObject\Events[] $similar_events
  620. * @return \Pimcore\Model\DataObject\Events
  621. */
  622. public function setSimilar_events(?array $similar_events)
  623. {
  624.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
  625.     $fd $this->getClass()->getFieldDefinition("similar_events");
  626.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  627.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  628.     $currentData $this->getSimilar_events();
  629.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  630.     $isEqual $fd->isEqual($currentData$similar_events);
  631.     if (!$isEqual) {
  632.         $this->markFieldDirty("similar_events"true);
  633.     }
  634.     $this->similar_events $fd->preSetData($this$similar_events);
  635.     return $this;
  636. }
  637. /**
  638. * Get show - Show
  639. * @return bool|null
  640. */
  641. public function getShow(): ?bool
  642. {
  643.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  644.         $preValue $this->preGetValue("show");
  645.         if ($preValue !== null) {
  646.             return $preValue;
  647.         }
  648.     }
  649.     $data $this->show;
  650.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  651.         return $data->getPlain();
  652.     }
  653.     return $data;
  654. }
  655. /**
  656. * Set show - Show
  657. * @param bool|null $show
  658. * @return \Pimcore\Model\DataObject\Events
  659. */
  660. public function setShow(?bool $show)
  661. {
  662.     $this->show $show;
  663.     return $this;
  664. }
  665. /**
  666. * Get detailListBlock - Detail List Block
  667. * @return \Pimcore\Model\DataObject\Data\BlockElement[][]
  668. */
  669. public function getDetailListBlock(): ?array
  670. {
  671.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  672.         $preValue $this->preGetValue("detailListBlock");
  673.         if ($preValue !== null) {
  674.             return $preValue;
  675.         }
  676.     }
  677.     $data $this->getClass()->getFieldDefinition("detailListBlock")->preGetData($this);
  678.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  679.         return $data->getPlain();
  680.     }
  681.     return $data;
  682. }
  683. /**
  684. * Set detailListBlock - Detail List Block
  685. * @param \Pimcore\Model\DataObject\Data\BlockElement[][] $detailListBlock
  686. * @return \Pimcore\Model\DataObject\Events
  687. */
  688. public function setDetailListBlock(?array $detailListBlock)
  689. {
  690.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Block $fd */
  691.     $fd $this->getClass()->getFieldDefinition("detailListBlock");
  692.     $this->detailListBlock $fd->preSetData($this$detailListBlock);
  693.     return $this;
  694. }
  695. }