You are here

public function FieldNormalizer::denormalize in Commerce Cart API 8

Overrides FieldNormalizer::denormalize

File

src/Normalizer/FieldNormalizer.php, line 62

Class

FieldNormalizer
Field normalizer which flattens output.

Namespace

Drupal\commerce_cart_api\Normalizer

Code

public function denormalize($data, $class, $format = NULL, array $context = []) {
  if (!is_array($data)) {
    $data = [
      $data,
    ];
  }
  return parent::denormalize($data, $class, $format, $context);
}