You are here

public function JsonBlueprintDenormalizer::denormalize in Subrequests 8.2

Same name and namespace in other branches
  1. 8 src/Normalizer/JsonBlueprintDenormalizer.php \Drupal\subrequests\Normalizer\JsonBlueprintDenormalizer::denormalize()
  2. 3.x src/Normalizer/JsonBlueprintDenormalizer.php \Drupal\subrequests\Normalizer\JsonBlueprintDenormalizer::denormalize()

File

src/Normalizer/JsonBlueprintDenormalizer.php, line 72

Class

JsonBlueprintDenormalizer
Denormalizer that builds the blueprint based on the incoming blueprint.

Namespace

Drupal\subrequests\Normalizer

Code

public function denormalize($data, $class, $format = NULL, array $context = []) {
  $this
    ->doValidateInput($data);
  $data = array_map([
    $this,
    'fillDefaults',
  ], $data);
  $subrequests = array_map(function ($item) {
    return new Subrequest($item);
  }, $data);
  return $this
    ->buildExecutionSequence($subrequests);
}