var/classes/DataObject/Auction.php line 462

Open in your IDE?
  1. <?php
  2. /**
  3.  * Inheritance: no
  4.  * Variants: no
  5.  *
  6.  * Fields Summary:
  7.  * - title [input]
  8.  * - slug [input]
  9.  * - start [datetime]
  10.  * - end [datetime]
  11.  * - lotsCount [input]
  12.  * - link [link]
  13.  * - auctionType [select]
  14.  * - platform [select]
  15.  * - iframe [input]
  16.  * - video [input]
  17.  * - externalAuctionSite [input]
  18.  * - auctionhouse [manyToOneRelation]
  19.  * - horseFolder [manyToOneRelation]
  20.  * - horses [advancedManyToManyObjectRelation]
  21.  * - attendees [advancedManyToManyObjectRelation]
  22.  * - image [image]
  23.  */
  24. namespace Pimcore\Model\DataObject;
  25. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  26. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  27. /**
  28. * @method static \Pimcore\Model\DataObject\Auction\Listing getList(array $config = [])
  29. * @method static \Pimcore\Model\DataObject\Auction\Listing|\Pimcore\Model\DataObject\Auction|null getByTitle($value, $limit = 0, $offset = 0, $objectTypes = null)
  30. * @method static \Pimcore\Model\DataObject\Auction\Listing|\Pimcore\Model\DataObject\Auction|null getBySlug($value, $limit = 0, $offset = 0, $objectTypes = null)
  31. * @method static \Pimcore\Model\DataObject\Auction\Listing|\Pimcore\Model\DataObject\Auction|null getByStart($value, $limit = 0, $offset = 0, $objectTypes = null)
  32. * @method static \Pimcore\Model\DataObject\Auction\Listing|\Pimcore\Model\DataObject\Auction|null getByEnd($value, $limit = 0, $offset = 0, $objectTypes = null)
  33. * @method static \Pimcore\Model\DataObject\Auction\Listing|\Pimcore\Model\DataObject\Auction|null getByLotsCount($value, $limit = 0, $offset = 0, $objectTypes = null)
  34. * @method static \Pimcore\Model\DataObject\Auction\Listing|\Pimcore\Model\DataObject\Auction|null getByAuctionType($value, $limit = 0, $offset = 0, $objectTypes = null)
  35. * @method static \Pimcore\Model\DataObject\Auction\Listing|\Pimcore\Model\DataObject\Auction|null getByPlatform($value, $limit = 0, $offset = 0, $objectTypes = null)
  36. * @method static \Pimcore\Model\DataObject\Auction\Listing|\Pimcore\Model\DataObject\Auction|null getByIframe($value, $limit = 0, $offset = 0, $objectTypes = null)
  37. * @method static \Pimcore\Model\DataObject\Auction\Listing|\Pimcore\Model\DataObject\Auction|null getByVideo($value, $limit = 0, $offset = 0, $objectTypes = null)
  38. * @method static \Pimcore\Model\DataObject\Auction\Listing|\Pimcore\Model\DataObject\Auction|null getByExternalAuctionSite($value, $limit = 0, $offset = 0, $objectTypes = null)
  39. * @method static \Pimcore\Model\DataObject\Auction\Listing|\Pimcore\Model\DataObject\Auction|null getByAuctionhouse($value, $limit = 0, $offset = 0, $objectTypes = null)
  40. * @method static \Pimcore\Model\DataObject\Auction\Listing|\Pimcore\Model\DataObject\Auction|null getByHorseFolder($value, $limit = 0, $offset = 0, $objectTypes = null)
  41. * @method static \Pimcore\Model\DataObject\Auction\Listing|\Pimcore\Model\DataObject\Auction|null getByHorses($value, $limit = 0, $offset = 0, $objectTypes = null)
  42. * @method static \Pimcore\Model\DataObject\Auction\Listing|\Pimcore\Model\DataObject\Auction|null getByAttendees($value, $limit = 0, $offset = 0, $objectTypes = null)
  43. * @method static \Pimcore\Model\DataObject\Auction\Listing|\Pimcore\Model\DataObject\Auction|null getByImage($value, $limit = 0, $offset = 0, $objectTypes = null)
  44. */
  45. class Auction extends Concrete
  46. {
  47. use \App\Auction\Model\AuctionTrait;
  48. protected $o_classId "auction";
  49. protected $o_className "Auction";
  50. protected $title;
  51. protected $slug;
  52. protected $start;
  53. protected $end;
  54. protected $lotsCount;
  55. protected $link;
  56. protected $auctionType;
  57. protected $platform;
  58. protected $iframe;
  59. protected $video;
  60. protected $externalAuctionSite;
  61. protected $auctionhouse;
  62. protected $horseFolder;
  63. protected $horses;
  64. protected $attendees;
  65. protected $image;
  66. /**
  67. * @param array $values
  68. * @return \Pimcore\Model\DataObject\Auction
  69. */
  70. public static function create($values = array()) {
  71.     $object = new static();
  72.     $object->setValues($values);
  73.     return $object;
  74. }
  75. /**
  76. * Get title - Titel
  77. * @return string|null
  78. */
  79. public function getTitle()
  80. {
  81.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  82.         $preValue $this->preGetValue("title");
  83.         if ($preValue !== null) {
  84.             return $preValue;
  85.         }
  86.     }
  87.     $data $this->title;
  88.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  89.         return $data->getPlain();
  90.     }
  91.     return $data;
  92. }
  93. /**
  94. * Set title - Titel
  95. * @param string|null $title
  96. * @return \Pimcore\Model\DataObject\Auction
  97. */
  98. public function setTitle($title)
  99. {
  100.     $this->title $title;
  101.     return $this;
  102. }
  103. /**
  104. * Get slug - Slug
  105. * @return string|null
  106. */
  107. public function getSlug()
  108. {
  109.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  110.         $preValue $this->preGetValue("slug");
  111.         if ($preValue !== null) {
  112.             return $preValue;
  113.         }
  114.     }
  115.     $data $this->slug;
  116.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  117.         return $data->getPlain();
  118.     }
  119.     return $data;
  120. }
  121. /**
  122. * Set slug - Slug
  123. * @param string|null $slug
  124. * @return \Pimcore\Model\DataObject\Auction
  125. */
  126. public function setSlug($slug)
  127. {
  128.     $this->slug $slug;
  129.     return $this;
  130. }
  131. /**
  132. * Get start - Beginn
  133. * @return \Carbon\Carbon|null
  134. */
  135. public function getStart()
  136. {
  137.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  138.         $preValue $this->preGetValue("start");
  139.         if ($preValue !== null) {
  140.             return $preValue;
  141.         }
  142.     }
  143.     $data $this->start;
  144.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  145.         return $data->getPlain();
  146.     }
  147.     return $data;
  148. }
  149. /**
  150. * Set start - Beginn
  151. * @param \Carbon\Carbon|null $start
  152. * @return \Pimcore\Model\DataObject\Auction
  153. */
  154. public function setStart($start)
  155. {
  156.     $this->start $start;
  157.     return $this;
  158. }
  159. /**
  160. * Get end - Ende
  161. * @return \Carbon\Carbon|null
  162. */
  163. public function getEnd()
  164. {
  165.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  166.         $preValue $this->preGetValue("end");
  167.         if ($preValue !== null) {
  168.             return $preValue;
  169.         }
  170.     }
  171.     $data $this->end;
  172.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  173.         return $data->getPlain();
  174.     }
  175.     return $data;
  176. }
  177. /**
  178. * Set end - Ende
  179. * @param \Carbon\Carbon|null $end
  180. * @return \Pimcore\Model\DataObject\Auction
  181. */
  182. public function setEnd($end)
  183. {
  184.     $this->end $end;
  185.     return $this;
  186. }
  187. /**
  188. * Get lotsCount - Anzahl Lots
  189. * @return string|null
  190. */
  191. public function getLotsCount()
  192. {
  193.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  194.         $preValue $this->preGetValue("lotsCount");
  195.         if ($preValue !== null) {
  196.             return $preValue;
  197.         }
  198.     }
  199.     $data $this->lotsCount;
  200.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  201.         return $data->getPlain();
  202.     }
  203.     return $data;
  204. }
  205. /**
  206. * Set lotsCount - Anzahl Lots
  207. * @param string|null $lotsCount
  208. * @return \Pimcore\Model\DataObject\Auction
  209. */
  210. public function setLotsCount($lotsCount)
  211. {
  212.     $this->lotsCount $lotsCount;
  213.     return $this;
  214. }
  215. /**
  216. * Get link - Link
  217. * @return \Pimcore\Model\DataObject\Data\Link|null
  218. */
  219. public function getLink()
  220. {
  221.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  222.         $preValue $this->preGetValue("link");
  223.         if ($preValue !== null) {
  224.             return $preValue;
  225.         }
  226.     }
  227.     $data $this->link;
  228.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  229.         return $data->getPlain();
  230.     }
  231.     return $data;
  232. }
  233. /**
  234. * Set link - Link
  235. * @param \Pimcore\Model\DataObject\Data\Link|null $link
  236. * @return \Pimcore\Model\DataObject\Auction
  237. */
  238. public function setLink($link)
  239. {
  240.     $this->link $link;
  241.     return $this;
  242. }
  243. /**
  244. * Get auctionType - Typ
  245. * @return string|null
  246. */
  247. public function getAuctionType()
  248. {
  249.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  250.         $preValue $this->preGetValue("auctionType");
  251.         if ($preValue !== null) {
  252.             return $preValue;
  253.         }
  254.     }
  255.     $data $this->auctionType;
  256.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  257.         return $data->getPlain();
  258.     }
  259.     return $data;
  260. }
  261. /**
  262. * Set auctionType - Typ
  263. * @param string|null $auctionType
  264. * @return \Pimcore\Model\DataObject\Auction
  265. */
  266. public function setAuctionType($auctionType)
  267. {
  268.     $this->auctionType $auctionType;
  269.     return $this;
  270. }
  271. /**
  272. * Get platform - Plattform
  273. * @return string|null
  274. */
  275. public function getPlatform()
  276. {
  277.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  278.         $preValue $this->preGetValue("platform");
  279.         if ($preValue !== null) {
  280.             return $preValue;
  281.         }
  282.     }
  283.     $data $this->platform;
  284.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  285.         return $data->getPlain();
  286.     }
  287.     return $data;
  288. }
  289. /**
  290. * Set platform - Plattform
  291. * @param string|null $platform
  292. * @return \Pimcore\Model\DataObject\Auction
  293. */
  294. public function setPlatform($platform)
  295. {
  296.     $this->platform $platform;
  297.     return $this;
  298. }
  299. /**
  300. * Get iframe - Externe Ergebnisse
  301. * @return string|null
  302. */
  303. public function getIframe()
  304. {
  305.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  306.         $preValue $this->preGetValue("iframe");
  307.         if ($preValue !== null) {
  308.             return $preValue;
  309.         }
  310.     }
  311.     $data $this->iframe;
  312.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  313.         return $data->getPlain();
  314.     }
  315.     return $data;
  316. }
  317. /**
  318. * Set iframe - Externe Ergebnisse
  319. * @param string|null $iframe
  320. * @return \Pimcore\Model\DataObject\Auction
  321. */
  322. public function setIframe($iframe)
  323. {
  324.     $this->iframe $iframe;
  325.     return $this;
  326. }
  327. /**
  328. * Get video - Video
  329. * @return string|null
  330. */
  331. public function getVideo()
  332. {
  333.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  334.         $preValue $this->preGetValue("video");
  335.         if ($preValue !== null) {
  336.             return $preValue;
  337.         }
  338.     }
  339.     $data $this->video;
  340.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  341.         return $data->getPlain();
  342.     }
  343.     return $data;
  344. }
  345. /**
  346. * Set video - Video
  347. * @param string|null $video
  348. * @return \Pimcore\Model\DataObject\Auction
  349. */
  350. public function setVideo($video)
  351. {
  352.     $this->video $video;
  353.     return $this;
  354. }
  355. /**
  356. * Get externalAuctionSite - Externe Auktionsseite
  357. * @return string|null
  358. */
  359. public function getExternalAuctionSite()
  360. {
  361.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  362.         $preValue $this->preGetValue("externalAuctionSite");
  363.         if ($preValue !== null) {
  364.             return $preValue;
  365.         }
  366.     }
  367.     $data $this->externalAuctionSite;
  368.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  369.         return $data->getPlain();
  370.     }
  371.     return $data;
  372. }
  373. /**
  374. * Set externalAuctionSite - Externe Auktionsseite
  375. * @param string|null $externalAuctionSite
  376. * @return \Pimcore\Model\DataObject\Auction
  377. */
  378. public function setExternalAuctionSite($externalAuctionSite)
  379. {
  380.     $this->externalAuctionSite $externalAuctionSite;
  381.     return $this;
  382. }
  383. /**
  384. * Get auctionhouse - Auktionshaus
  385. * @return \Pimcore\Model\DataObject\Profile | \Pimcore\Model\DataObject\Auctionhouse|null
  386. */
  387. public function getAuctionhouse()
  388. {
  389.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  390.         $preValue $this->preGetValue("auctionhouse");
  391.         if ($preValue !== null) {
  392.             return $preValue;
  393.         }
  394.     }
  395.     $data $this->getClass()->getFieldDefinition("auctionhouse")->preGetData($this);
  396.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  397.         return $data->getPlain();
  398.     }
  399.     return $data;
  400. }
  401. /**
  402. * Set auctionhouse - Auktionshaus
  403. * @param \Pimcore\Model\DataObject\Profile | \Pimcore\Model\DataObject\Auctionhouse $auctionhouse
  404. * @return \Pimcore\Model\DataObject\Auction
  405. */
  406. public function setAuctionhouse($auctionhouse)
  407. {
  408.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
  409.     $fd $this->getClass()->getFieldDefinition("auctionhouse");
  410.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  411.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  412.     $currentData $this->getAuctionhouse();
  413.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  414.     $isEqual $fd->isEqual($currentData$auctionhouse);
  415.     if (!$isEqual) {
  416.         $this->markFieldDirty("auctionhouse"true);
  417.     }
  418.     $this->auctionhouse $fd->preSetData($this$auctionhouse);
  419.     return $this;
  420. }
  421. /**
  422. * Get horseFolder - Pferdeordner
  423. * @return \Pimcore\Model\DataObject\Folder|null
  424. */
  425. public function getHorseFolder()
  426. {
  427.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  428.         $preValue $this->preGetValue("horseFolder");
  429.         if ($preValue !== null) {
  430.             return $preValue;
  431.         }
  432.     }
  433.     $data $this->getClass()->getFieldDefinition("horseFolder")->preGetData($this);
  434.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  435.         return $data->getPlain();
  436.     }
  437.     return $data;
  438. }
  439. /**
  440. * Set horseFolder - Pferdeordner
  441. * @param \Pimcore\Model\DataObject\Folder $horseFolder
  442. * @return \Pimcore\Model\DataObject\Auction
  443. */
  444. public function setHorseFolder($horseFolder)
  445. {
  446.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
  447.     $fd $this->getClass()->getFieldDefinition("horseFolder");
  448.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  449.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  450.     $currentData $this->getHorseFolder();
  451.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  452.     $isEqual $fd->isEqual($currentData$horseFolder);
  453.     if (!$isEqual) {
  454.         $this->markFieldDirty("horseFolder"true);
  455.     }
  456.     $this->horseFolder $fd->preSetData($this$horseFolder);
  457.     return $this;
  458. }
  459. /**
  460. * Get horses - Pferde
  461. * @return \Pimcore\Model\DataObject\Data\ObjectMetadata[]
  462. */
  463. public function getHorses()
  464. {
  465.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  466.         $preValue $this->preGetValue("horses");
  467.         if ($preValue !== null) {
  468.             return $preValue;
  469.         }
  470.     }
  471.     $data $this->getClass()->getFieldDefinition("horses")->preGetData($this);
  472.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  473.         return $data->getPlain();
  474.     }
  475.     return $data;
  476. }
  477. /**
  478. * Set horses - Pferde
  479. * @param \Pimcore\Model\DataObject\Data\ObjectMetadata[] $horses
  480. * @return \Pimcore\Model\DataObject\Auction
  481. */
  482. public function setHorses($horses)
  483. {
  484.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\AdvancedManyToManyObjectRelation $fd */
  485.     $fd $this->getClass()->getFieldDefinition("horses");
  486.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  487.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  488.     $currentData $this->getHorses();
  489.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  490.     $isEqual $fd->isEqual($currentData$horses);
  491.     if (!$isEqual) {
  492.         $this->markFieldDirty("horses"true);
  493.     }
  494.     $this->horses $fd->preSetData($this$horses);
  495.     return $this;
  496. }
  497. /**
  498. * Get attendees - Teilnehmer
  499. * @return \Pimcore\Model\DataObject\Data\ObjectMetadata[]
  500. */
  501. public function getAttendees()
  502. {
  503.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  504.         $preValue $this->preGetValue("attendees");
  505.         if ($preValue !== null) {
  506.             return $preValue;
  507.         }
  508.     }
  509.     $data $this->getClass()->getFieldDefinition("attendees")->preGetData($this);
  510.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  511.         return $data->getPlain();
  512.     }
  513.     return $data;
  514. }
  515. /**
  516. * Set attendees - Teilnehmer
  517. * @param \Pimcore\Model\DataObject\Data\ObjectMetadata[] $attendees
  518. * @return \Pimcore\Model\DataObject\Auction
  519. */
  520. public function setAttendees($attendees)
  521. {
  522.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\AdvancedManyToManyObjectRelation $fd */
  523.     $fd $this->getClass()->getFieldDefinition("attendees");
  524.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  525.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  526.     $currentData $this->getAttendees();
  527.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  528.     $isEqual $fd->isEqual($currentData$attendees);
  529.     if (!$isEqual) {
  530.         $this->markFieldDirty("attendees"true);
  531.     }
  532.     $this->attendees $fd->preSetData($this$attendees);
  533.     return $this;
  534. }
  535. /**
  536. * Get image - Bild
  537. * @return \Pimcore\Model\Asset\Image|null
  538. */
  539. public function getImage()
  540. {
  541.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  542.         $preValue $this->preGetValue("image");
  543.         if ($preValue !== null) {
  544.             return $preValue;
  545.         }
  546.     }
  547.     $data $this->image;
  548.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  549.         return $data->getPlain();
  550.     }
  551.     return $data;
  552. }
  553. /**
  554. * Set image - Bild
  555. * @param \Pimcore\Model\Asset\Image|null $image
  556. * @return \Pimcore\Model\DataObject\Auction
  557. */
  558. public function setImage($image)
  559. {
  560.     $this->image $image;
  561.     return $this;
  562. }
  563. }