public function ImageNormalizerValue::rasterizeValue in Consumer Image Styles 8.2
Same name and namespace in other branches
- 8 src/Normalizer/Value/ImageNormalizerValue.php \Drupal\consumer_image_styles\Normalizer\Value\ImageNormalizerValue::rasterizeValue()
Get the rasterized value.
Return value
mixed The value.
Overrides ValueExtractorInterface::rasterizeValue
File
- src/
Normalizer/ Value/ ImageNormalizerValue.php, line 38
Class
Namespace
Drupal\consumer_image_styles\Normalizer\ValueCode
public function rasterizeValue() {
$rasterized = $this->subject
->rasterizeValue();
$derivatives = $this->variants
->rasterizeValue();
if (empty($derivatives)) {
return $rasterized;
}
$rasterized['meta'] = empty($rasterized['meta']) ? [] : $rasterized['meta'];
$rasterized['meta']['derivatives'] = $derivatives;
return $rasterized;
}