You are here

interface CacheableNormalizerInterface in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/serialization/src/Normalizer/CacheableNormalizerInterface.php \Drupal\serialization\Normalizer\CacheableNormalizerInterface
  2. 10 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

4 files declare their use of CacheableNormalizerInterface
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.