public function marshal($value, $object = null, $params = [])
{
if ($value instanceof Object\Data\Hotspotimage) {
$result = [];
$result["hotspots"] = $value->getHotspots();
$result["marker"] = $value->getMarker();
$result["crop"] = $value->getCrop();
$image = $value->getImage();
if ($image) {
$type = Element\Service::getType($image);
$id = $image->getId();
$result["image"] = ["type" => $type, "id" => $id];
}
return $result;
}
return null;
}