var/classes/DataObject/Teaserquerformat.php line 33

Open in your IDE?
  1. <?php
  2. /**
  3.  * Inheritance: no
  4.  * Variants: no
  5.  *
  6.  * Fields Summary:
  7.  * - bild [image]
  8.  * - bild_saison_winter [image]
  9.  * - localizedfields [localizedfields]
  10.  * -- title [textarea]
  11.  * -- headline_small [textarea]
  12.  * -- link [link]
  13.  * -- button_text [textarea]
  14.  */
  15. namespace Pimcore\Model\DataObject;
  16. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  17. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  18. /**
  19. * @method static \Pimcore\Model\DataObject\Teaserquerformat\Listing getList(array $config = [])
  20. * @method static \Pimcore\Model\DataObject\Teaserquerformat\Listing|\Pimcore\Model\DataObject\Teaserquerformat|null getByBild($value, $limit = 0, $offset = 0, $objectTypes = null)
  21. * @method static \Pimcore\Model\DataObject\Teaserquerformat\Listing|\Pimcore\Model\DataObject\Teaserquerformat|null getByBild_saison_winter($value, $limit = 0, $offset = 0, $objectTypes = null)
  22. * @method static \Pimcore\Model\DataObject\Teaserquerformat\Listing|\Pimcore\Model\DataObject\Teaserquerformat|null getByLocalizedfields($field, $value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  23. * @method static \Pimcore\Model\DataObject\Teaserquerformat\Listing|\Pimcore\Model\DataObject\Teaserquerformat|null getByTitle($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  24. * @method static \Pimcore\Model\DataObject\Teaserquerformat\Listing|\Pimcore\Model\DataObject\Teaserquerformat|null getByHeadline_small($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  25. * @method static \Pimcore\Model\DataObject\Teaserquerformat\Listing|\Pimcore\Model\DataObject\Teaserquerformat|null getByLink($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  26. * @method static \Pimcore\Model\DataObject\Teaserquerformat\Listing|\Pimcore\Model\DataObject\Teaserquerformat|null getByButton_text($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  27. */
  28. class Teaserquerformat extends Concrete
  29. {
  30. protected $o_classId "19";
  31. protected $o_className "teaserquerformat";
  32. protected $bild;
  33. protected $bild_saison_winter;
  34. protected $localizedfields;
  35. /**
  36. * @param array $values
  37. * @return \Pimcore\Model\DataObject\Teaserquerformat
  38. */
  39. public static function create($values = array()) {
  40.     $object = new static();
  41.     $object->setValues($values);
  42.     return $object;
  43. }
  44. /**
  45. * Get bild - Bild (Sommer)
  46. * @return \Pimcore\Model\Asset\Image|null
  47. */
  48. public function getBild()
  49. {
  50.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  51.         $preValue $this->preGetValue("bild");
  52.         if ($preValue !== null) {
  53.             return $preValue;
  54.         }
  55.     }
  56.     $data $this->bild;
  57.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  58.         return $data->getPlain();
  59.     }
  60.     return $data;
  61. }
  62. /**
  63. * Set bild - Bild (Sommer)
  64. * @param \Pimcore\Model\Asset\Image|null $bild
  65. * @return \Pimcore\Model\DataObject\Teaserquerformat
  66. */
  67. public function setBild($bild)
  68. {
  69.     $this->bild $bild;
  70.     return $this;
  71. }
  72. /**
  73. * Get bild_saison_winter - Bild (Winter)
  74. * @return \Pimcore\Model\Asset\Image|null
  75. */
  76. public function getBild_saison_winter()
  77. {
  78.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  79.         $preValue $this->preGetValue("bild_saison_winter");
  80.         if ($preValue !== null) {
  81.             return $preValue;
  82.         }
  83.     }
  84.     $data $this->bild_saison_winter;
  85.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  86.         return $data->getPlain();
  87.     }
  88.     return $data;
  89. }
  90. /**
  91. * Set bild_saison_winter - Bild (Winter)
  92. * @param \Pimcore\Model\Asset\Image|null $bild_saison_winter
  93. * @return \Pimcore\Model\DataObject\Teaserquerformat
  94. */
  95. public function setBild_saison_winter($bild_saison_winter)
  96. {
  97.     $this->bild_saison_winter $bild_saison_winter;
  98.     return $this;
  99. }
  100. /**
  101. * Get localizedfields - 
  102. * @return \Pimcore\Model\DataObject\Localizedfield|null
  103. */
  104. public function getLocalizedfields()
  105. {
  106.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  107.         $preValue $this->preGetValue("localizedfields");
  108.         if ($preValue !== null) {
  109.             return $preValue;
  110.         }
  111.     }
  112.     $data $this->getClass()->getFieldDefinition("localizedfields")->preGetData($this);
  113.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  114.         return $data->getPlain();
  115.     }
  116.     return $data;
  117. }
  118. /**
  119. * Get title - grosse Headline 
  120. * @return string|null
  121. */
  122. public function getTitle($language null)
  123. {
  124.     $data $this->getLocalizedfields()->getLocalizedValue("title"$language);
  125.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  126.         $preValue $this->preGetValue("title");
  127.         if ($preValue !== null) {
  128.             return $preValue;
  129.         }
  130.     }
  131.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  132.         return $data->getPlain();
  133.     }
  134.     return $data;
  135. }
  136. /**
  137. * Get headline_small - schmale (sub) Headline
  138. * @return string|null
  139. */
  140. public function getHeadline_small($language null)
  141. {
  142.     $data $this->getLocalizedfields()->getLocalizedValue("headline_small"$language);
  143.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  144.         $preValue $this->preGetValue("headline_small");
  145.         if ($preValue !== null) {
  146.             return $preValue;
  147.         }
  148.     }
  149.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  150.         return $data->getPlain();
  151.     }
  152.     return $data;
  153. }
  154. /**
  155. * Get link - Link (Optional)
  156. * @return \Pimcore\Model\DataObject\Data\Link|null
  157. */
  158. public function getLink($language null)
  159. {
  160.     $data $this->getLocalizedfields()->getLocalizedValue("link"$language);
  161.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  162.         $preValue $this->preGetValue("link");
  163.         if ($preValue !== null) {
  164.             return $preValue;
  165.         }
  166.     }
  167.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  168.         return $data->getPlain();
  169.     }
  170.     return $data;
  171. }
  172. /**
  173. * Get button_text - Button Text
  174. * @return string|null
  175. */
  176. public function getButton_text($language null)
  177. {
  178.     $data $this->getLocalizedfields()->getLocalizedValue("button_text"$language);
  179.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  180.         $preValue $this->preGetValue("button_text");
  181.         if ($preValue !== null) {
  182.             return $preValue;
  183.         }
  184.     }
  185.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  186.         return $data->getPlain();
  187.     }
  188.     return $data;
  189. }
  190. /**
  191. * Set localizedfields - 
  192. * @param \Pimcore\Model\DataObject\Localizedfield|null $localizedfields
  193. * @return \Pimcore\Model\DataObject\Teaserquerformat
  194. */
  195. public function setLocalizedfields($localizedfields)
  196. {
  197.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  198.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  199.     $currentData $this->getLocalizedfields();
  200.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  201.     $this->markFieldDirty("localizedfields"true);
  202.     $this->localizedfields $localizedfields;
  203.     return $this;
  204. }
  205. /**
  206. * Set title - grosse Headline 
  207. * @param string|null $title
  208. * @return \Pimcore\Model\DataObject\Teaserquerformat
  209. */
  210. public function setTitle ($title$language null)
  211. {
  212.     $isEqual false;
  213.     $this->getLocalizedfields()->setLocalizedValue("title"$title$language, !$isEqual);
  214.     return $this;
  215. }
  216. /**
  217. * Set headline_small - schmale (sub) Headline
  218. * @param string|null $headline_small
  219. * @return \Pimcore\Model\DataObject\Teaserquerformat
  220. */
  221. public function setHeadline_small ($headline_small$language null)
  222. {
  223.     $isEqual false;
  224.     $this->getLocalizedfields()->setLocalizedValue("headline_small"$headline_small$language, !$isEqual);
  225.     return $this;
  226. }
  227. /**
  228. * Set link - Link (Optional)
  229. * @param \Pimcore\Model\DataObject\Data\Link|null $link
  230. * @return \Pimcore\Model\DataObject\Teaserquerformat
  231. */
  232. public function setLink ($link$language null)
  233. {
  234.     $isEqual false;
  235.     $this->getLocalizedfields()->setLocalizedValue("link"$link$language, !$isEqual);
  236.     return $this;
  237. }
  238. /**
  239. * Set button_text - Button Text
  240. * @param string|null $button_text
  241. * @return \Pimcore\Model\DataObject\Teaserquerformat
  242. */
  243. public function setButton_text ($button_text$language null)
  244. {
  245.     $isEqual false;
  246.     $this->getLocalizedfields()->setLocalizedValue("button_text"$button_text$language, !$isEqual);
  247.     return $this;
  248. }
  249. }