var/classes/DataObject/AlpsteinProperty.php line 29

Open in your IDE?
  1. <?php
  2. /**
  3.  * Inheritance: no
  4.  * Variants: no
  5.  *
  6.  * Fields Summary:
  7.  * - tag [input]
  8.  * - generalSolutionsId [input]
  9.  * - icon [image]
  10.  * - localizedfields [localizedfields]
  11.  * -- name [input]
  12.  */
  13. namespace Pimcore\Model\DataObject;
  14. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  15. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  16. /**
  17. * @method static \Pimcore\Model\DataObject\AlpsteinProperty\Listing getList(array $config = [])
  18. * @method static \Pimcore\Model\DataObject\AlpsteinProperty\Listing|\Pimcore\Model\DataObject\AlpsteinProperty|null getByTag($value, $limit = 0, $offset = 0, $objectTypes = null)
  19. * @method static \Pimcore\Model\DataObject\AlpsteinProperty\Listing|\Pimcore\Model\DataObject\AlpsteinProperty|null getByGeneralSolutionsId($value, $limit = 0, $offset = 0, $objectTypes = null)
  20. * @method static \Pimcore\Model\DataObject\AlpsteinProperty\Listing|\Pimcore\Model\DataObject\AlpsteinProperty|null getByIcon($value, $limit = 0, $offset = 0, $objectTypes = null)
  21. * @method static \Pimcore\Model\DataObject\AlpsteinProperty\Listing|\Pimcore\Model\DataObject\AlpsteinProperty|null getByLocalizedfields($field, $value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  22. * @method static \Pimcore\Model\DataObject\AlpsteinProperty\Listing|\Pimcore\Model\DataObject\AlpsteinProperty|null getByName($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  23. */
  24. class AlpsteinProperty extends Concrete
  25. {
  26. protected $o_classId "AlpsteinProperty";
  27. protected $o_className "AlpsteinProperty";
  28. protected $tag;
  29. protected $generalSolutionsId;
  30. protected $icon;
  31. protected $localizedfields;
  32. /**
  33. * @param array $values
  34. * @return \Pimcore\Model\DataObject\AlpsteinProperty
  35. */
  36. public static function create($values = array()) {
  37.     $object = new static();
  38.     $object->setValues($values);
  39.     return $object;
  40. }
  41. /**
  42. * Get tag - tag
  43. * @return string|null
  44. */
  45. public function getTag()
  46. {
  47.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  48.         $preValue $this->preGetValue("tag");
  49.         if ($preValue !== null) {
  50.             return $preValue;
  51.         }
  52.     }
  53.     $data $this->tag;
  54.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  55.         return $data->getPlain();
  56.     }
  57.     return $data;
  58. }
  59. /**
  60. * Set tag - tag
  61. * @param string|null $tag
  62. * @return \Pimcore\Model\DataObject\AlpsteinProperty
  63. */
  64. public function setTag($tag)
  65. {
  66.     $this->tag $tag;
  67.     return $this;
  68. }
  69. /**
  70. * Get generalSolutionsId - General Solutions ID
  71. * @return string|null
  72. */
  73. public function getGeneralSolutionsId()
  74. {
  75.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  76.         $preValue $this->preGetValue("generalSolutionsId");
  77.         if ($preValue !== null) {
  78.             return $preValue;
  79.         }
  80.     }
  81.     $data $this->generalSolutionsId;
  82.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  83.         return $data->getPlain();
  84.     }
  85.     return $data;
  86. }
  87. /**
  88. * Set generalSolutionsId - General Solutions ID
  89. * @param string|null $generalSolutionsId
  90. * @return \Pimcore\Model\DataObject\AlpsteinProperty
  91. */
  92. public function setGeneralSolutionsId($generalSolutionsId)
  93. {
  94.     $this->generalSolutionsId $generalSolutionsId;
  95.     return $this;
  96. }
  97. /**
  98. * Get icon - icon
  99. * @return \Pimcore\Model\Asset\Image|null
  100. */
  101. public function getIcon()
  102. {
  103.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  104.         $preValue $this->preGetValue("icon");
  105.         if ($preValue !== null) {
  106.             return $preValue;
  107.         }
  108.     }
  109.     $data $this->icon;
  110.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  111.         return $data->getPlain();
  112.     }
  113.     return $data;
  114. }
  115. /**
  116. * Set icon - icon
  117. * @param \Pimcore\Model\Asset\Image|null $icon
  118. * @return \Pimcore\Model\DataObject\AlpsteinProperty
  119. */
  120. public function setIcon($icon)
  121. {
  122.     $this->icon $icon;
  123.     return $this;
  124. }
  125. /**
  126. * Get localizedfields - 
  127. * @return \Pimcore\Model\DataObject\Localizedfield|null
  128. */
  129. public function getLocalizedfields()
  130. {
  131.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  132.         $preValue $this->preGetValue("localizedfields");
  133.         if ($preValue !== null) {
  134.             return $preValue;
  135.         }
  136.     }
  137.     $data $this->getClass()->getFieldDefinition("localizedfields")->preGetData($this);
  138.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  139.         return $data->getPlain();
  140.     }
  141.     return $data;
  142. }
  143. /**
  144. * Get name - name
  145. * @return string|null
  146. */
  147. public function getName($language null)
  148. {
  149.     $data $this->getLocalizedfields()->getLocalizedValue("name"$language);
  150.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  151.         $preValue $this->preGetValue("name");
  152.         if ($preValue !== null) {
  153.             return $preValue;
  154.         }
  155.     }
  156.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  157.         return $data->getPlain();
  158.     }
  159.     return $data;
  160. }
  161. /**
  162. * Set localizedfields - 
  163. * @param \Pimcore\Model\DataObject\Localizedfield|null $localizedfields
  164. * @return \Pimcore\Model\DataObject\AlpsteinProperty
  165. */
  166. public function setLocalizedfields($localizedfields)
  167. {
  168.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  169.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  170.     $currentData $this->getLocalizedfields();
  171.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  172.     $this->markFieldDirty("localizedfields"true);
  173.     $this->localizedfields $localizedfields;
  174.     return $this;
  175. }
  176. /**
  177. * Set name - name
  178. * @param string|null $name
  179. * @return \Pimcore\Model\DataObject\AlpsteinProperty
  180. */
  181. public function setName ($name$language null)
  182. {
  183.     $isEqual false;
  184.     $this->getLocalizedfields()->setLocalizedValue("name"$name$language, !$isEqual);
  185.     return $this;
  186. }
  187. }