var/classes/DataObject/Googlemap.php line 24

Open in your IDE?
  1. <?php
  2. /**
  3.  * Inheritance: no
  4.  * Variants: no
  5.  *
  6.  * Fields Summary:
  7.  * - point [geopoint]
  8.  * - label [input]
  9.  * - address [textarea]
  10.  */
  11. namespace Pimcore\Model\DataObject;
  12. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  13. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  14. /**
  15. * @method static \Pimcore\Model\DataObject\Googlemap\Listing getList(array $config = [])
  16. * @method static \Pimcore\Model\DataObject\Googlemap\Listing|\Pimcore\Model\DataObject\Googlemap|null getByLabel($value, $limit = 0, $offset = 0, $objectTypes = null)
  17. * @method static \Pimcore\Model\DataObject\Googlemap\Listing|\Pimcore\Model\DataObject\Googlemap|null getByAddress($value, $limit = 0, $offset = 0, $objectTypes = null)
  18. */
  19. class Googlemap extends Concrete
  20. {
  21. protected $o_classId "2";
  22. protected $o_className "googlemap";
  23. protected $point;
  24. protected $label;
  25. protected $address;
  26. /**
  27. * @param array $values
  28. * @return \Pimcore\Model\DataObject\Googlemap
  29. */
  30. public static function create($values = array()) {
  31.     $object = new static();
  32.     $object->setValues($values);
  33.     return $object;
  34. }
  35. /**
  36. * Get point - Adresse
  37. * @return \Pimcore\Model\DataObject\Data\GeoCoordinates|null
  38. */
  39. public function getPoint(): ?\Pimcore\Model\DataObject\Data\GeoCoordinates
  40. {
  41.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  42.         $preValue $this->preGetValue("point");
  43.         if ($preValue !== null) {
  44.             return $preValue;
  45.         }
  46.     }
  47.     $data $this->point;
  48.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  49.         return $data->getPlain();
  50.     }
  51.     return $data;
  52. }
  53. /**
  54. * Set point - Adresse
  55. * @param \Pimcore\Model\DataObject\Data\GeoCoordinates|null $point
  56. * @return \Pimcore\Model\DataObject\Googlemap
  57. */
  58. public function setPoint(?\Pimcore\Model\DataObject\Data\GeoCoordinates $point)
  59. {
  60.     $this->point $point;
  61.     return $this;
  62. }
  63. /**
  64. * Get label - Headline
  65. * @return string|null
  66. */
  67. public function getLabel(): ?string
  68. {
  69.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  70.         $preValue $this->preGetValue("label");
  71.         if ($preValue !== null) {
  72.             return $preValue;
  73.         }
  74.     }
  75.     $data $this->label;
  76.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  77.         return $data->getPlain();
  78.     }
  79.     return $data;
  80. }
  81. /**
  82. * Set label - Headline
  83. * @param string|null $label
  84. * @return \Pimcore\Model\DataObject\Googlemap
  85. */
  86. public function setLabel(?string $label)
  87. {
  88.     $this->label $label;
  89.     return $this;
  90. }
  91. /**
  92. * Get address - Adresse
  93. * @return string|null
  94. */
  95. public function getAddress(): ?string
  96. {
  97.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  98.         $preValue $this->preGetValue("address");
  99.         if ($preValue !== null) {
  100.             return $preValue;
  101.         }
  102.     }
  103.     $data $this->address;
  104.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  105.         return $data->getPlain();
  106.     }
  107.     return $data;
  108. }
  109. /**
  110. * Set address - Adresse
  111. * @param string|null $address
  112. * @return \Pimcore\Model\DataObject\Googlemap
  113. */
  114. public function setAddress(?string $address)
  115. {
  116.     $this->address $address;
  117.     return $this;
  118. }
  119. }