var/classes/DataObject/Projekt.php line 38

Open in your IDE?
  1. <?php
  2. /**
  3.  * Inheritance: no
  4.  * Variants: no
  5.  *
  6.  * Fields Summary:
  7.  * - date [date]
  8.  * - category [manyToManyRelation]
  9.  * - maintitle [textarea]
  10.  * - intro [wysiwyg]
  11.  * - facts [structuredTable]
  12.  * - textLeft [wysiwyg]
  13.  * - textRight [wysiwyg]
  14.  * - video [video]
  15.  * - image [image]
  16.  * - shadowImage [image]
  17.  * - gallery [imageGallery]
  18.  */
  19. namespace Pimcore\Model\DataObject;
  20. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  21. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  22. /**
  23. * @method static \Pimcore\Model\DataObject\Projekt\Listing getList(array $config = [])
  24. * @method static \Pimcore\Model\DataObject\Projekt\Listing|\Pimcore\Model\DataObject\Projekt|null getByDate($value, $limit = 0, $offset = 0, $objectTypes = null)
  25. * @method static \Pimcore\Model\DataObject\Projekt\Listing|\Pimcore\Model\DataObject\Projekt|null getByCategory($value, $limit = 0, $offset = 0, $objectTypes = null)
  26. * @method static \Pimcore\Model\DataObject\Projekt\Listing|\Pimcore\Model\DataObject\Projekt|null getByMaintitle($value, $limit = 0, $offset = 0, $objectTypes = null)
  27. * @method static \Pimcore\Model\DataObject\Projekt\Listing|\Pimcore\Model\DataObject\Projekt|null getByIntro($value, $limit = 0, $offset = 0, $objectTypes = null)
  28. * @method static \Pimcore\Model\DataObject\Projekt\Listing|\Pimcore\Model\DataObject\Projekt|null getByTextLeft($value, $limit = 0, $offset = 0, $objectTypes = null)
  29. * @method static \Pimcore\Model\DataObject\Projekt\Listing|\Pimcore\Model\DataObject\Projekt|null getByTextRight($value, $limit = 0, $offset = 0, $objectTypes = null)
  30. * @method static \Pimcore\Model\DataObject\Projekt\Listing|\Pimcore\Model\DataObject\Projekt|null getByImage($value, $limit = 0, $offset = 0, $objectTypes = null)
  31. * @method static \Pimcore\Model\DataObject\Projekt\Listing|\Pimcore\Model\DataObject\Projekt|null getByShadowImage($value, $limit = 0, $offset = 0, $objectTypes = null)
  32. */
  33. class Projekt extends Concrete
  34. {
  35. protected $o_classId "Projekt";
  36. protected $o_className "Projekt";
  37. protected $date;
  38. protected $category;
  39. protected $maintitle;
  40. protected $intro;
  41. protected $facts;
  42. protected $textLeft;
  43. protected $textRight;
  44. protected $video;
  45. protected $image;
  46. protected $shadowImage;
  47. protected $gallery;
  48. /**
  49. * @param array $values
  50. * @return \Pimcore\Model\DataObject\Projekt
  51. */
  52. public static function create($values = array()) {
  53.     $object = new static();
  54.     $object->setValues($values);
  55.     return $object;
  56. }
  57. /**
  58. * Get date - Date
  59. * @return \Carbon\Carbon|null
  60. */
  61. public function getDate(): ?\Carbon\Carbon
  62. {
  63.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  64.         $preValue $this->preGetValue("date");
  65.         if ($preValue !== null) {
  66.             return $preValue;
  67.         }
  68.     }
  69.     $data $this->date;
  70.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  71.         return $data->getPlain();
  72.     }
  73.     return $data;
  74. }
  75. /**
  76. * Set date - Date
  77. * @param \Carbon\Carbon|null $date
  78. * @return \Pimcore\Model\DataObject\Projekt
  79. */
  80. public function setDate(?\Carbon\Carbon $date)
  81. {
  82.     $this->date $date;
  83.     return $this;
  84. }
  85. /**
  86. * Get category - Category
  87. * @return \Pimcore\Model\DataObject\Category[]
  88. */
  89. public function getCategory(): array
  90. {
  91.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  92.         $preValue $this->preGetValue("category");
  93.         if ($preValue !== null) {
  94.             return $preValue;
  95.         }
  96.     }
  97.     $data $this->getClass()->getFieldDefinition("category")->preGetData($this);
  98.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  99.         return $data->getPlain();
  100.     }
  101.     return $data;
  102. }
  103. /**
  104. * Set category - Category
  105. * @param \Pimcore\Model\DataObject\Category[] $category
  106. * @return \Pimcore\Model\DataObject\Projekt
  107. */
  108. public function setCategory(?array $category)
  109. {
  110.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyRelation $fd */
  111.     $fd $this->getClass()->getFieldDefinition("category");
  112.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  113.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  114.     $currentData $this->getCategory();
  115.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  116.     $isEqual $fd->isEqual($currentData$category);
  117.     if (!$isEqual) {
  118.         $this->markFieldDirty("category"true);
  119.     }
  120.     $this->category $fd->preSetData($this$category);
  121.     return $this;
  122. }
  123. /**
  124. * Get maintitle - Maintitle
  125. * @return string|null
  126. */
  127. public function getMaintitle(): ?string
  128. {
  129.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  130.         $preValue $this->preGetValue("maintitle");
  131.         if ($preValue !== null) {
  132.             return $preValue;
  133.         }
  134.     }
  135.     $data $this->maintitle;
  136.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  137.         return $data->getPlain();
  138.     }
  139.     return $data;
  140. }
  141. /**
  142. * Set maintitle - Maintitle
  143. * @param string|null $maintitle
  144. * @return \Pimcore\Model\DataObject\Projekt
  145. */
  146. public function setMaintitle(?string $maintitle)
  147. {
  148.     $this->maintitle $maintitle;
  149.     return $this;
  150. }
  151. /**
  152. * Get intro - Intro
  153. * @return string|null
  154. */
  155. public function getIntro(): ?string
  156. {
  157.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  158.         $preValue $this->preGetValue("intro");
  159.         if ($preValue !== null) {
  160.             return $preValue;
  161.         }
  162.     }
  163.     $data $this->getClass()->getFieldDefinition("intro")->preGetData($this);
  164.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  165.         return $data->getPlain();
  166.     }
  167.     return $data;
  168. }
  169. /**
  170. * Set intro - Intro
  171. * @param string|null $intro
  172. * @return \Pimcore\Model\DataObject\Projekt
  173. */
  174. public function setIntro(?string $intro)
  175. {
  176.     $this->intro $intro;
  177.     return $this;
  178. }
  179. /**
  180. * Get facts - Facts
  181. * @return \Pimcore\Model\DataObject\Data\StructuredTable|null
  182. */
  183. public function getFacts(): ?\Pimcore\Model\DataObject\Data\StructuredTable
  184. {
  185.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  186.         $preValue $this->preGetValue("facts");
  187.         if ($preValue !== null) {
  188.             return $preValue;
  189.         }
  190.     }
  191.     $data $this->facts;
  192.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  193.         return $data->getPlain();
  194.     }
  195.     return $data;
  196. }
  197. /**
  198. * Set facts - Facts
  199. * @param \Pimcore\Model\DataObject\Data\StructuredTable|null $facts
  200. * @return \Pimcore\Model\DataObject\Projekt
  201. */
  202. public function setFacts(?\Pimcore\Model\DataObject\Data\StructuredTable $facts)
  203. {
  204.     $this->facts $facts;
  205.     return $this;
  206. }
  207. /**
  208. * Get textLeft - Text Left
  209. * @return string|null
  210. */
  211. public function getTextLeft(): ?string
  212. {
  213.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  214.         $preValue $this->preGetValue("textLeft");
  215.         if ($preValue !== null) {
  216.             return $preValue;
  217.         }
  218.     }
  219.     $data $this->getClass()->getFieldDefinition("textLeft")->preGetData($this);
  220.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  221.         return $data->getPlain();
  222.     }
  223.     return $data;
  224. }
  225. /**
  226. * Set textLeft - Text Left
  227. * @param string|null $textLeft
  228. * @return \Pimcore\Model\DataObject\Projekt
  229. */
  230. public function setTextLeft(?string $textLeft)
  231. {
  232.     $this->textLeft $textLeft;
  233.     return $this;
  234. }
  235. /**
  236. * Get textRight - Text Right
  237. * @return string|null
  238. */
  239. public function getTextRight(): ?string
  240. {
  241.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  242.         $preValue $this->preGetValue("textRight");
  243.         if ($preValue !== null) {
  244.             return $preValue;
  245.         }
  246.     }
  247.     $data $this->getClass()->getFieldDefinition("textRight")->preGetData($this);
  248.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  249.         return $data->getPlain();
  250.     }
  251.     return $data;
  252. }
  253. /**
  254. * Set textRight - Text Right
  255. * @param string|null $textRight
  256. * @return \Pimcore\Model\DataObject\Projekt
  257. */
  258. public function setTextRight(?string $textRight)
  259. {
  260.     $this->textRight $textRight;
  261.     return $this;
  262. }
  263. /**
  264. * Get video - Video
  265. * @return \Pimcore\Model\DataObject\Data\Video|null
  266. */
  267. public function getVideo(): ?\Pimcore\Model\DataObject\Data\Video
  268. {
  269.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  270.         $preValue $this->preGetValue("video");
  271.         if ($preValue !== null) {
  272.             return $preValue;
  273.         }
  274.     }
  275.     $data $this->video;
  276.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  277.         return $data->getPlain();
  278.     }
  279.     return $data;
  280. }
  281. /**
  282. * Set video - Video
  283. * @param \Pimcore\Model\DataObject\Data\Video|null $video
  284. * @return \Pimcore\Model\DataObject\Projekt
  285. */
  286. public function setVideo(?\Pimcore\Model\DataObject\Data\Video $video)
  287. {
  288.     $this->video $video;
  289.     return $this;
  290. }
  291. /**
  292. * Get image - Image
  293. * @return \Pimcore\Model\Asset\Image|null
  294. */
  295. public function getImage(): ?\Pimcore\Model\Asset\Image
  296. {
  297.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  298.         $preValue $this->preGetValue("image");
  299.         if ($preValue !== null) {
  300.             return $preValue;
  301.         }
  302.     }
  303.     $data $this->image;
  304.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  305.         return $data->getPlain();
  306.     }
  307.     return $data;
  308. }
  309. /**
  310. * Set image - Image
  311. * @param \Pimcore\Model\Asset\Image|null $image
  312. * @return \Pimcore\Model\DataObject\Projekt
  313. */
  314. public function setImage(?\Pimcore\Model\Asset\Image $image)
  315. {
  316.     $this->image $image;
  317.     return $this;
  318. }
  319. /**
  320. * Get shadowImage - Shadow Image
  321. * @return \Pimcore\Model\Asset\Image|null
  322. */
  323. public function getShadowImage(): ?\Pimcore\Model\Asset\Image
  324. {
  325.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  326.         $preValue $this->preGetValue("shadowImage");
  327.         if ($preValue !== null) {
  328.             return $preValue;
  329.         }
  330.     }
  331.     $data $this->shadowImage;
  332.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  333.         return $data->getPlain();
  334.     }
  335.     return $data;
  336. }
  337. /**
  338. * Set shadowImage - Shadow Image
  339. * @param \Pimcore\Model\Asset\Image|null $shadowImage
  340. * @return \Pimcore\Model\DataObject\Projekt
  341. */
  342. public function setShadowImage(?\Pimcore\Model\Asset\Image $shadowImage)
  343. {
  344.     $this->shadowImage $shadowImage;
  345.     return $this;
  346. }
  347. /**
  348. * Get gallery - Gallery
  349. * @return \Pimcore\Model\DataObject\Data\ImageGallery|null
  350. */
  351. public function getGallery(): ?\Pimcore\Model\DataObject\Data\ImageGallery
  352. {
  353.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  354.         $preValue $this->preGetValue("gallery");
  355.         if ($preValue !== null) {
  356.             return $preValue;
  357.         }
  358.     }
  359.     $data $this->gallery;
  360.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  361.         return $data->getPlain();
  362.     }
  363.     return $data;
  364. }
  365. /**
  366. * Set gallery - Gallery
  367. * @param \Pimcore\Model\DataObject\Data\ImageGallery|null $gallery
  368. * @return \Pimcore\Model\DataObject\Projekt
  369. */
  370. public function setGallery(?\Pimcore\Model\DataObject\Data\ImageGallery $gallery)
  371. {
  372.     $this->gallery $gallery;
  373.     return $this;
  374. }
  375. }