public function getDataForResource($data, $object = null, $params = [])
{
if ($data instanceof Object\Data\Hotspotimage) {
$imageId = null;
if ($data->getImage()) {
$imageId = $data->getImage()->getId();
}
$metaData = ["hotspots" => $data->getHotspots(), "marker" => $data->getMarker(), "crop" => $data->getCrop()];
$metaData = Serialize::serialize($metaData);
return [$this->getName() . "__image" => $imageId, $this->getName() . "__hotspots" => $metaData];
}
return [$this->getName() . "__image" => null, $this->getName() . "__hotspots" => null];
}