You are here

public function LinkCollectionNormalizer::__construct in Consumer Image Styles 4.x

Same name and namespace in other branches
  1. 8.3 src/Normalizer/LinkCollectionNormalizer.php \Drupal\consumer_image_styles\Normalizer\LinkCollectionNormalizer::__construct()

Constructs a LinkCollectionNormalizer object.

Parameters

\Symfony\Component\Serializer\Normalizer\NormalizerInterface $inner: The decorated service.

\Drupal\consumers\Negotiator $consumer_negotiator: The consumer negotiator.

\Drupal\consumer_image_styles\ImageStylesProviderInterface: Image styles utility.

\Drupal\Core\Image\ImageFactory $image_factory: The image factory.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

File

src/Normalizer/LinkCollectionNormalizer.php, line 67

Class

LinkCollectionNormalizer
Custom normalizer that add the derivatives to image entities.

Namespace

Drupal\consumer_image_styles\Normalizer

Code

public function __construct(NormalizerInterface $inner, Negotiator $consumer_negotiator, ImageStylesProviderInterface $imageStylesProvider, ImageFactory $image_factory, RequestStack $request_stack) {
  $this->inner = $inner;
  $this->consumerNegotiator = $consumer_negotiator;
  $this->imageStylesProvider = $imageStylesProvider;
  $this->imageFactory = $image_factory;
  $this->requestStack = $request_stack;
}