replication-8.x-1.x-dev/src/Normalizer/DeletedFlagItemListNormalizer.php
src/Normalizer/DeletedFlagItemListNormalizer.php
<?php namespace Drupal\replication\Normalizer; use Drupal\serialization\Normalizer\NormalizerBase; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; class DeletedFlagItemListNormalizer extends NormalizerBase implements DenormalizerInterface { /** * @var string[] */ protected $supportedInterfaceOrClass = ['Drupal\multiversion\Plugin\Field\FieldType\DeletedFlagItemList']; /** * {@inheritdoc} */ public function normalize($field, $format = NULL, array $context = []) { return $field->value; } /** * {@inheritdoc} */ public function denormalize($data, $class, $format = NULL, array $context = []) { return [['value' => $data]]; } }