You are here

public function ImageHotspot::getCoordinates in Image Hotspots 8

Returns hotspot base coordinates.

Return value

array Array with X and Y keys for coordinates.

Overrides ImageHotspotInterface::getCoordinates

File

src/Entity/ImageHotspot.php, line 110

Class

ImageHotspot
Defines the image hotspot entity class.

Namespace

Drupal\image_hotspots\Entity

Code

public function getCoordinates() {
  return [
    'x' => $this->x->value,
    'y' => $this->y->value,
    'x2' => $this->x2->value,
    'y2' => $this->y2->value,
  ];
}