public function evaluate()
{
$asset = $this->getAsset();
if (!$asset instanceof AssetInterface) {
throw new \Exception('No asset given for rendering.', 1415184217);
}
$thumbnailConfiguration = new ThumbnailConfiguration($this->getWidth(), $this->getMaximumWidth(), $this->getHeight(), $this->getMaximumHeight(), $this->getAllowCropping(), $this->getAllowUpScaling());
$thumbnailData = $this->assetService->getThumbnailUriAndSizeForAsset($asset, $thumbnailConfiguration);
if ($thumbnailData === null) {
return '';
}
return $thumbnailData['src'];
}