public function ResourceResponseSubscriber::__construct in JSON:API 8
Same name and namespace in other branches
- 8.2 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 50
Class
- ResourceResponseSubscriber
- Response subscriber that serializes and removes ResourceResponses' data.
Namespace
Drupal\jsonapi\EventSubscriberCode
public function __construct(SerializerInterface $serializer) {
$this->serializer = $serializer;
}