You are here

public function ResourceResponseSubscriber::__construct in JSON:API 8.2

Same name and namespace in other branches
  1. 8 src/EventSubscriber/ResourceResponseSubscriber.php \Drupal\jsonapi\EventSubscriber\ResourceResponseSubscriber::__construct()

Constructs a ResourceResponseSubscriber object.

Parameters

\Symfony\Component\Serializer\SerializerInterface $serializer: The serializer.

File

src/EventSubscriber/ResourceResponseSubscriber.php, line 54

Class

ResourceResponseSubscriber
Response subscriber that serializes and removes ResourceResponses' data.

Namespace

Drupal\jsonapi\EventSubscriber

Code

public function __construct(SerializerInterface $serializer) {
  $this->serializer = $serializer;
}