You are here

interface CacheableNormalizerInterface in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/serialization/src/Normalizer/CacheableNormalizerInterface.php \Drupal\serialization\Normalizer\CacheableNormalizerInterface

Defines the interface for normalizers producing cacheable normalizations.

Hierarchy

  • interface \Drupal\serialization\Normalizer\CacheableNormalizerInterface extends \Symfony\Component\Serializer\Normalizer\NormalizerInterface

Expanded class hierarchy of CacheableNormalizerInterface

All classes that implement CacheableNormalizerInterface

See also

Cache API

5 files declare their use of CacheableNormalizerInterface
EntitySerializationTest.php in core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php
FieldItemNormalizer.php in core/modules/jsonapi/src/Normalizer/FieldItemNormalizer.php
HalLinkManagerTest.php in core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php
LinkManagerBase.php in core/modules/hal/src/LinkManager/LinkManagerBase.php
ResourceResponseSubscriber.php in core/modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php

File

core/modules/serialization/src/Normalizer/CacheableNormalizerInterface.php, line 12

Namespace

Drupal\serialization\Normalizer
View source
interface CacheableNormalizerInterface extends NormalizerInterface {

  /**
   * Name of key for bubbling cacheability metadata via serialization context.
   *
   * @see \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize()
   * @see \Symfony\Component\Serializer\SerializerInterface::serialize()
   * @see \Drupal\rest\EventSubscriber\ResourceResponseSubscriber::renderResponseBody()
   */
  const SERIALIZATION_CONTEXT_CACHEABILITY = 'cacheability';

}

Members

Namesort descending Modifiers Type Description Overrides
CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY constant Name of key for bubbling cacheability metadata via serialization context.