2 namespace TYPO3\CMS\Fluid\ViewHelpers\Uri;
86 public function render($src = null, $image = null, $width = null, $height = null, $minWidth = null, $minHeight = null, $maxWidth = null, $maxHeight = null, $treatIdAsReference =
false, $crop = null, $absolute =
false)
88 return self::renderStatic(
94 'minWidth' => $minWidth,
95 'minHeight' => $minHeight,
96 'maxWidth' => $maxWidth,
97 'maxHeight' => $maxHeight,
98 'treatIdAsReference' => $treatIdAsReference,
100 'absolute' => $absolute,
103 $this->renderingContext
116 $src = $arguments[
'src'];
117 $image = $arguments[
'image'];
118 $treatIdAsReference = $arguments[
'treatIdAsReference'];
119 $crop = $arguments[
'crop'];
120 $absolute = $arguments[
'absolute'];
122 if (is_null($src) && is_null($image) || !is_null($src) && !is_null($image)) {
123 throw new Exception(
'You must either specify a string src or a File object.', 1382284105);
126 $imageService = self::getImageService();
127 $image = $imageService->getImage($src, $image, $treatIdAsReference);
129 if ($crop === null) {
133 $processingInstructions = array(
134 'width' => $arguments[
'width'],
135 'height' => $arguments[
'height'],
136 'minWidth' => $arguments[
'minWidth'],
137 'minHeight' => $arguments[
'minHeight'],
138 'maxWidth' => $arguments[
'maxWidth'],
139 'maxHeight' => $arguments[
'maxHeight'],
142 $processedImage = $imageService->applyProcessingInstructions($image, $processingInstructions);
143 return $imageService->getImageUri($processedImage, $absolute);
151 protected static function getImageService()