UnprocessableHttpEntityExceptionNormalizer
class UnprocessableHttpEntityExceptionNormalizer extends HttpExceptionNormalizer (View source)
| internal | JSON:API maintains no PHP API since its API is the HTTP API. This class may change at any time and this will break any dependencies on it. |
Normalizes and UnprocessableHttpEntityException.
Normalizes an UnprocessableHttpEntityException in compliance with the JSON API specification. A source pointer is added to help client applications report validation errors, for example on an Entity edit form.
Traits
Properties
| protected string | $supportedInterfaceOrClass | The interface or class that this Normalizer supports. |
|
| protected | $format | {@inheritdoc} | from NormalizerBase |
| protected AccountInterface | $currentUser | The current user making the request. |
from HttpExceptionNormalizer |
Methods
Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization()
Checks if the provided format is supported by this normalizer.
Rasterizes a value recursively.
Builds the normalized JSON:API error objects for the response.
Return a string to the common problem type.
Details
supportsNormalization($data, $format = NULL)
{@inheritdoc}
supportsDenormalization($data, $type, $format = NULL)
Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization()
This class doesn't implement DenormalizerInterface, but most of its child classes do. Therefore, this method is implemented at this level to reduce code duplication.
protected bool
checkFormat(string $format = NULL)
Checks if the provided format is supported by this normalizer.
protected
addCacheableDependency(array $context, $data)
Adds cacheability if applicable.
static protected mixed
rasterizeValueRecursive(mixed $value)
Rasterizes a value recursively.
This is mainly for configuration entities where a field can be a tree of values to rasterize.
__construct(AccountInterface $current_user)
HttpExceptionNormalizer constructor.
normalize($object, $format = NULL, array $context = [])
{@inheritdoc}
protected array
buildErrorObjects(HttpException $exception)
Builds the normalized JSON:API error objects for the response.
static string|null
getInfoUrl($status_code)
| internal |
Return a string to the common problem type.