function ResourceResponseSubscriber::__construct
Same name in this branch
- 9 core/modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php \Drupal\rest\EventSubscriber\ResourceResponseSubscriber::__construct()
Same name in other branches
- 8.9.x core/modules/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php \Drupal\jsonapi\EventSubscriber\ResourceResponseSubscriber::__construct()
- 8.9.x core/modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php \Drupal\rest\EventSubscriber\ResourceResponseSubscriber::__construct()
- 10 core/modules/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php \Drupal\jsonapi\EventSubscriber\ResourceResponseSubscriber::__construct()
- 10 core/modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php \Drupal\rest\EventSubscriber\ResourceResponseSubscriber::__construct()
- 11.x core/modules/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php \Drupal\jsonapi\EventSubscriber\ResourceResponseSubscriber::__construct()
- 11.x core/modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php \Drupal\rest\EventSubscriber\ResourceResponseSubscriber::__construct()
Constructs a ResourceResponseSubscriber object.
Parameters
\Symfony\Component\Serializer\SerializerInterface $serializer: The serializer.
File
-
core/
modules/ jsonapi/ 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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.