Neos\Neos\Fusion\ImageUriImplementation::evaluate PHP Method

evaluate() public method

Returns a processed image path
public evaluate ( ) : string
return string
    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'];
    }