interface CacheableNormalizerInterface

Same name 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
  3. 11.x 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

Title Sort descending Modifiers Object type Summary
CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY constant Name of key for bubbling cacheability metadata via serialization context.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.