Pimcore\Model\Object\ClassDefinition\Data\Geopolygon::getDiffVersionPreview PHP Method

getDiffVersionPreview() public method

Generates a pretty version preview (similar to getVersionPreview) can be either html or a image URL. See the ObjectMerger plugin documentation for details
public getDiffVersionPreview ( $data, null $object = null, mixed $params = [] ) : array | string
$data
$object null
$params mixed
return array | string
    public function getDiffVersionPreview($data, $object = null, $params = [])
    {
        if (!empty($data)) {
            $line = "";
            $isFirst = true;
            if (is_array($data)) {
                $points = [];
                foreach ($data as $point) {
                    if (!$isFirst) {
                        $line .= " ";
                    }
                    $line .= $point->getLatitude() . "," . $point->getLongitude();
                    $isFirst = false;
                }
                return $line;
            }
        }
        return;
    }