Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BackedEnumNormalizerContextBuilder.php

function BackedEnumNormalizerContextBuilder::withAllowInvalidValues

Configures if invalid values are allowed in denormalization. They will be denormalized into `null` values.

File

vendor/symfony/serializer/Context/Normalizer/BackedEnumNormalizerContextBuilder.php, line 31

Class

BackedEnumNormalizerContextBuilder
A helper providing autocompletion for available BackedEnumNormalizer options.

Namespace

Symfony\Component\Serializer\Context\Normalizer

Code

public function withAllowInvalidValues(bool $allowInvalidValues) : static {
    return $this->with(BackedEnumNormalizer::ALLOW_INVALID_VALUES, $allowInvalidValues);
}
RSS feed
Powered by Drupal