You are here

public function ImageEntityNormalizer::normalize in Consumer Image Styles 8

Same name and namespace in other branches
  1. 8.2 src/Normalizer/ImageEntityNormalizer.php \Drupal\consumer_image_styles\Normalizer\ImageEntityNormalizer::normalize()

Overrides EntityNormalizer::normalize

File

src/Normalizer/ImageEntityNormalizer.php, line 103

Class

ImageEntityNormalizer

Namespace

Drupal\consumer_image_styles\Normalizer

Code

public function normalize($entity, $format = NULL, array $context = []) {
  $file_entity_values = parent::normalize($entity, $format, $context);
  $variants = $this
    ->buildVariantValues($entity, $context);
  return new ImageNormalizerValue($variants, $file_entity_values);
}