DeletedFlagItemListNormalizer.php in Replication 8.2
File
src/Normalizer/DeletedFlagItemListNormalizer.php
View source
<?php
namespace Drupal\replication\Normalizer;
use Drupal\serialization\Normalizer\NormalizerBase;
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
class DeletedFlagItemListNormalizer extends NormalizerBase implements DenormalizerInterface {
protected $supportedInterfaceOrClass = [
'Drupal\\multiversion\\Plugin\\Field\\FieldType\\DeletedFlagItemList',
];
public function normalize($field, $format = NULL, array $context = []) {
return $field->value;
}
public function denormalize($data, $class, $format = NULL, array $context = []) {
return [
[
'value' => $data,
],
];
}
}