var/classes/DataObject/AlpsteinRegion.php line 40

Open in your IDE?
  1. <?php
  2. /**
  3.  * Inheritance: no
  4.  * Variants: no
  5.  *
  6.  * Fields Summary:
  7.  * - alpsteinId [input]
  8.  * - generalSolutionsId [input]
  9.  * - localizedfields [localizedfields]
  10.  * -- name [input]
  11.  * - regionType [select]
  12.  * - hasTour [checkbox]
  13.  * - bbox [geobounds]
  14.  * - level [numeric]
  15.  * - subRegions [manyToManyObjectRelation]
  16.  * - category [manyToOneRelation]
  17.  * - alpsteinKey [manyToManyRelation]
  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\AlpsteinRegion\Listing getList(array $config = [])
  24. * @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByAlpsteinId($value, $limit = 0, $offset = 0, $objectTypes = null)
  25. * @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByGeneralSolutionsId($value, $limit = 0, $offset = 0, $objectTypes = null)
  26. * @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByLocalizedfields($field, $value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  27. * @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByName($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  28. * @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByRegionType($value, $limit = 0, $offset = 0, $objectTypes = null)
  29. * @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByHasTour($value, $limit = 0, $offset = 0, $objectTypes = null)
  30. * @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByLevel($value, $limit = 0, $offset = 0, $objectTypes = null)
  31. * @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getBySubRegions($value, $limit = 0, $offset = 0, $objectTypes = null)
  32. * @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByCategory($value, $limit = 0, $offset = 0, $objectTypes = null)
  33. * @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByAlpsteinKey($value, $limit = 0, $offset = 0, $objectTypes = null)
  34. */
  35. class AlpsteinRegion extends Concrete
  36. {
  37. protected $o_classId "AlpsteinRegion";
  38. protected $o_className "AlpsteinRegion";
  39. protected $alpsteinId;
  40. protected $generalSolutionsId;
  41. protected $localizedfields;
  42. protected $regionType;
  43. protected $hasTour;
  44. protected $bbox;
  45. protected $level;
  46. protected $subRegions;
  47. protected $category;
  48. protected $alpsteinKey;
  49. /**
  50. * @param array $values
  51. * @return \Pimcore\Model\DataObject\AlpsteinRegion
  52. */
  53. public static function create($values = array()) {
  54.     $object = new static();
  55.     $object->setValues($values);
  56.     return $object;
  57. }
  58. /**
  59. * Get alpsteinId - Alpstein ID
  60. * @return string|null
  61. */
  62. public function getAlpsteinId()
  63. {
  64.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  65.         $preValue $this->preGetValue("alpsteinId");
  66.         if ($preValue !== null) {
  67.             return $preValue;
  68.         }
  69.     }
  70.     $data $this->alpsteinId;
  71.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  72.         return $data->getPlain();
  73.     }
  74.     return $data;
  75. }
  76. /**
  77. * Set alpsteinId - Alpstein ID
  78. * @param string|null $alpsteinId
  79. * @return \Pimcore\Model\DataObject\AlpsteinRegion
  80. */
  81. public function setAlpsteinId($alpsteinId)
  82. {
  83.     $this->alpsteinId $alpsteinId;
  84.     return $this;
  85. }
  86. /**
  87. * Get generalSolutionsId - General Solutions ID
  88. * @return string|null
  89. */
  90. public function getGeneralSolutionsId()
  91. {
  92.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  93.         $preValue $this->preGetValue("generalSolutionsId");
  94.         if ($preValue !== null) {
  95.             return $preValue;
  96.         }
  97.     }
  98.     $data $this->generalSolutionsId;
  99.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  100.         return $data->getPlain();
  101.     }
  102.     return $data;
  103. }
  104. /**
  105. * Set generalSolutionsId - General Solutions ID
  106. * @param string|null $generalSolutionsId
  107. * @return \Pimcore\Model\DataObject\AlpsteinRegion
  108. */
  109. public function setGeneralSolutionsId($generalSolutionsId)
  110. {
  111.     $this->generalSolutionsId $generalSolutionsId;
  112.     return $this;
  113. }
  114. /**
  115. * Get localizedfields - 
  116. * @return \Pimcore\Model\DataObject\Localizedfield|null
  117. */
  118. public function getLocalizedfields()
  119. {
  120.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  121.         $preValue $this->preGetValue("localizedfields");
  122.         if ($preValue !== null) {
  123.             return $preValue;
  124.         }
  125.     }
  126.     $data $this->getClass()->getFieldDefinition("localizedfields")->preGetData($this);
  127.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  128.         return $data->getPlain();
  129.     }
  130.     return $data;
  131. }
  132. /**
  133. * Get name - Name
  134. * @return string|null
  135. */
  136. public function getName($language null)
  137. {
  138.     $data $this->getLocalizedfields()->getLocalizedValue("name"$language);
  139.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  140.         $preValue $this->preGetValue("name");
  141.         if ($preValue !== null) {
  142.             return $preValue;
  143.         }
  144.     }
  145.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  146.         return $data->getPlain();
  147.     }
  148.     return $data;
  149. }
  150. /**
  151. * Set localizedfields - 
  152. * @param \Pimcore\Model\DataObject\Localizedfield|null $localizedfields
  153. * @return \Pimcore\Model\DataObject\AlpsteinRegion
  154. */
  155. public function setLocalizedfields($localizedfields)
  156. {
  157.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  158.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  159.     $currentData $this->getLocalizedfields();
  160.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  161.     $this->markFieldDirty("localizedfields"true);
  162.     $this->localizedfields $localizedfields;
  163.     return $this;
  164. }
  165. /**
  166. * Set name - Name
  167. * @param string|null $name
  168. * @return \Pimcore\Model\DataObject\AlpsteinRegion
  169. */
  170. public function setName ($name$language null)
  171. {
  172.     $isEqual false;
  173.     $this->getLocalizedfields()->setLocalizedValue("name"$name$language, !$isEqual);
  174.     return $this;
  175. }
  176. /**
  177. * Get regionType - Region Type
  178. * @return string|null
  179. */
  180. public function getRegionType()
  181. {
  182.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  183.         $preValue $this->preGetValue("regionType");
  184.         if ($preValue !== null) {
  185.             return $preValue;
  186.         }
  187.     }
  188.     $data $this->regionType;
  189.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  190.         return $data->getPlain();
  191.     }
  192.     return $data;
  193. }
  194. /**
  195. * Set regionType - Region Type
  196. * @param string|null $regionType
  197. * @return \Pimcore\Model\DataObject\AlpsteinRegion
  198. */
  199. public function setRegionType($regionType)
  200. {
  201.     $this->regionType $regionType;
  202.     return $this;
  203. }
  204. /**
  205. * Get hasTour - has Tour
  206. * @return bool|null
  207. */
  208. public function getHasTour()
  209. {
  210.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  211.         $preValue $this->preGetValue("hasTour");
  212.         if ($preValue !== null) {
  213.             return $preValue;
  214.         }
  215.     }
  216.     $data $this->hasTour;
  217.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  218.         return $data->getPlain();
  219.     }
  220.     return $data;
  221. }
  222. /**
  223. * Set hasTour - has Tour
  224. * @param bool|null $hasTour
  225. * @return \Pimcore\Model\DataObject\AlpsteinRegion
  226. */
  227. public function setHasTour($hasTour)
  228. {
  229.     $this->hasTour $hasTour;
  230.     return $this;
  231. }
  232. /**
  233. * Get bbox - bbox
  234. * @return \Pimcore\Model\DataObject\Data\Geobounds|null
  235. */
  236. public function getBbox()
  237. {
  238.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  239.         $preValue $this->preGetValue("bbox");
  240.         if ($preValue !== null) {
  241.             return $preValue;
  242.         }
  243.     }
  244.     $data $this->bbox;
  245.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  246.         return $data->getPlain();
  247.     }
  248.     return $data;
  249. }
  250. /**
  251. * Set bbox - bbox
  252. * @param \Pimcore\Model\DataObject\Data\Geobounds|null $bbox
  253. * @return \Pimcore\Model\DataObject\AlpsteinRegion
  254. */
  255. public function setBbox($bbox)
  256. {
  257.     $this->bbox $bbox;
  258.     return $this;
  259. }
  260. /**
  261. * Get level - Level
  262. * @return float|null
  263. */
  264. public function getLevel()
  265. {
  266.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  267.         $preValue $this->preGetValue("level");
  268.         if ($preValue !== null) {
  269.             return $preValue;
  270.         }
  271.     }
  272.     $data $this->level;
  273.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  274.         return $data->getPlain();
  275.     }
  276.     return $data;
  277. }
  278. /**
  279. * Set level - Level
  280. * @param float|null $level
  281. * @return \Pimcore\Model\DataObject\AlpsteinRegion
  282. */
  283. public function setLevel($level)
  284. {
  285.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Numeric $fd */
  286.     $fd $this->getClass()->getFieldDefinition("level");
  287.     $this->level $fd->preSetData($this$level);
  288.     return $this;
  289. }
  290. /**
  291. * Get subRegions - Sub Regions
  292. * @return \Pimcore\Model\DataObject\AlpsteinRegion[]
  293. */
  294. public function getSubRegions()
  295. {
  296.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  297.         $preValue $this->preGetValue("subRegions");
  298.         if ($preValue !== null) {
  299.             return $preValue;
  300.         }
  301.     }
  302.     $data $this->getClass()->getFieldDefinition("subRegions")->preGetData($this);
  303.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  304.         return $data->getPlain();
  305.     }
  306.     return $data;
  307. }
  308. /**
  309. * Set subRegions - Sub Regions
  310. * @param \Pimcore\Model\DataObject\AlpsteinRegion[] $subRegions
  311. * @return \Pimcore\Model\DataObject\AlpsteinRegion
  312. */
  313. public function setSubRegions($subRegions)
  314. {
  315.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
  316.     $fd $this->getClass()->getFieldDefinition("subRegions");
  317.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  318.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  319.     $currentData $this->getSubRegions();
  320.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  321.     $isEqual $fd->isEqual($currentData$subRegions);
  322.     if (!$isEqual) {
  323.         $this->markFieldDirty("subRegions"true);
  324.     }
  325.     $this->subRegions $fd->preSetData($this$subRegions);
  326.     return $this;
  327. }
  328. /**
  329. * Get category - Category
  330. * @return \Pimcore\Model\DataObject\AlpsteinRegionCategory|null
  331. */
  332. public function getCategory()
  333. {
  334.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  335.         $preValue $this->preGetValue("category");
  336.         if ($preValue !== null) {
  337.             return $preValue;
  338.         }
  339.     }
  340.     $data $this->getClass()->getFieldDefinition("category")->preGetData($this);
  341.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  342.         return $data->getPlain();
  343.     }
  344.     return $data;
  345. }
  346. /**
  347. * Set category - Category
  348. * @param \Pimcore\Model\DataObject\AlpsteinRegionCategory $category
  349. * @return \Pimcore\Model\DataObject\AlpsteinRegion
  350. */
  351. public function setCategory($category)
  352. {
  353.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
  354.     $fd $this->getClass()->getFieldDefinition("category");
  355.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  356.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  357.     $currentData $this->getCategory();
  358.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  359.     $isEqual $fd->isEqual($currentData$category);
  360.     if (!$isEqual) {
  361.         $this->markFieldDirty("category"true);
  362.     }
  363.     $this->category $fd->preSetData($this$category);
  364.     return $this;
  365. }
  366. /**
  367. * Get alpsteinKey - Alpstein Key
  368. * @return \Pimcore\Model\DataObject\AlpsteinKey[]
  369. */
  370. public function getAlpsteinKey()
  371. {
  372.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  373.         $preValue $this->preGetValue("alpsteinKey");
  374.         if ($preValue !== null) {
  375.             return $preValue;
  376.         }
  377.     }
  378.     $data $this->getClass()->getFieldDefinition("alpsteinKey")->preGetData($this);
  379.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  380.         return $data->getPlain();
  381.     }
  382.     return $data;
  383. }
  384. /**
  385. * Set alpsteinKey - Alpstein Key
  386. * @param \Pimcore\Model\DataObject\AlpsteinKey[] $alpsteinKey
  387. * @return \Pimcore\Model\DataObject\AlpsteinRegion
  388. */
  389. public function setAlpsteinKey($alpsteinKey)
  390. {
  391.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyRelation $fd */
  392.     $fd $this->getClass()->getFieldDefinition("alpsteinKey");
  393.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  394.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  395.     $currentData $this->getAlpsteinKey();
  396.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  397.     $isEqual $fd->isEqual($currentData$alpsteinKey);
  398.     if (!$isEqual) {
  399.         $this->markFieldDirty("alpsteinKey"true);
  400.     }
  401.     $this->alpsteinKey $fd->preSetData($this$alpsteinKey);
  402.     return $this;
  403. }
  404. }