public DefaultExceptionSubscriber::__construct(SerializerInterface$serializer, array$serializer_formats)
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 37
Class
- DefaultExceptionSubscriber
- Handles default error responses in serialization formats.
Namespace
Drupal\serialization\EventSubscriber
Code
public function __construct(SerializerInterface $serializer, array $serializer_formats) { $this->serializer = $serializer; $this->serializerFormats = $serializer_formats; }
Please login to continue.