public function ResourceResponseSubscriber::__construct in JSON:API 8.2
Same name and namespace in other branches
- 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\EventSubscriberCode
public function __construct(SerializerInterface $serializer) {
$this->serializer = $serializer;
}