You are here

public function PathFieldItemListNormalizer::denormalize in Replication 8

Overrides FieldNormalizer::denormalize

File

src/Normalizer/PathFieldItemListNormalizer.php, line 42

Class

PathFieldItemListNormalizer
Normalizes path field.

Namespace

Drupal\replication\Normalizer

Code

public function denormalize($data, $class, $format = NULL, array $context = []) {
  if (isset($data[0]['pid'])) {
    unset($data[0]['pid']);
  }
  if (isset($data[0]['source'])) {
    unset($data[0]['source']);
  }
  if (isset($data[0]['workspace'])) {
    unset($data[0]['workspace']);
  }
  return parent::denormalize($data, $class, $format, $context);
}