class RevisionInfoItemListNormalizer in Replication 8
Same name and namespace in other branches
- 8.2 src/Normalizer/RevisionInfoItemListNormalizer.php \Drupal\replication\Normalizer\RevisionInfoItemListNormalizer
Hierarchy
- class \Drupal\serialization\Normalizer\NormalizerBase implements \Symfony\Component\Serializer\SerializerAwareInterface, CacheableNormalizerInterface uses \Symfony\Component\Serializer\SerializerAwareTrait
- class \Drupal\serialization\Normalizer\ListNormalizer
- class \Drupal\replication\Normalizer\RevisionInfoItemListNormalizer
- class \Drupal\serialization\Normalizer\ListNormalizer
Expanded class hierarchy of RevisionInfoItemListNormalizer
1 string reference to 'RevisionInfoItemListNormalizer'
1 service uses RevisionInfoItemListNormalizer
File
- src/
Normalizer/ RevisionInfoItemListNormalizer.php, line 7
Namespace
Drupal\replication\NormalizerView source
class RevisionInfoItemListNormalizer extends ListNormalizer {
/**
* @var string[]
*/
protected $supportedInterfaceOrClass = [
'Drupal\\multiversion\\Plugin\\Field\\FieldType\\RevisionInfoItemList',
];
/**
* @var string[]
*/
protected $format = [
'json',
];
/**
* {@inheritdoc}
*/
public function normalize($field, $format = NULL, array $context = []) {
if (!empty($context['query']['revs_info'])) {
return parent::normalize($field, $format, $context);
}
return [];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CacheableNormalizerInterface:: |
constant | Name of key for bubbling cacheability metadata via serialization context. | ||
NormalizerBase:: |
protected | function | Adds cacheability if applicable. | |
NormalizerBase:: |
protected | function | Checks if the provided format is supported by this normalizer. | 2 |
NormalizerBase:: |
public | function | Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization() | 1 |
NormalizerBase:: |
public | function | Checks whether the given class is supported for normalization by this normalizer. | 1 |
RevisionInfoItemListNormalizer:: |
protected | property |
Overrides NormalizerBase:: |
|
RevisionInfoItemListNormalizer:: |
protected | property |
Overrides ListNormalizer:: |
|
RevisionInfoItemListNormalizer:: |
public | function |
Normalizes an object into a set of arrays/scalars. Overrides ListNormalizer:: |