function DefaultExceptionSubscriber::__construct
Same name in other branches
- 9 core/modules/serialization/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\serialization\EventSubscriber\DefaultExceptionSubscriber::__construct()
- 8.9.x core/modules/serialization/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\serialization\EventSubscriber\DefaultExceptionSubscriber::__construct()
- 11.x core/modules/serialization/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\serialization\EventSubscriber\DefaultExceptionSubscriber::__construct()
DefaultExceptionSubscriber constructor.
Parameters
\Symfony\Component\Serializer\SerializerInterface $serializer: The serializer service.
array $serializer_formats: The available serialization formats.
File
-
core/
modules/ serialization/ src/ EventSubscriber/ DefaultExceptionSubscriber.php, line 39
Class
- DefaultExceptionSubscriber
- Handles default error responses in serialization formats.
Namespace
Drupal\serialization\EventSubscriberCode
public function __construct(SerializerInterface $serializer, array $serializer_formats) {
$this->serializer = $serializer;
$this->serializerFormats = $serializer_formats;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.