You are here

public static function CacheableNormalization::permanent in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/jsonapi/src/Normalizer/Value/CacheableNormalization.php \Drupal\jsonapi\Normalizer\Value\CacheableNormalization::permanent()
  2. 9 core/modules/jsonapi/src/Normalizer/Value/CacheableNormalization.php \Drupal\jsonapi\Normalizer\Value\CacheableNormalization::permanent()

Creates a CacheableNormalization instance without any special cacheability.

Parameters

array|string|int|float|bool|null $normalization: The normalized data. This value must not contain any CacheableNormalizations.

Return value

static The CacheableNormalization.

1 call to CacheableNormalization::permanent()
ResourceObjectNormalizerCacherTest::testLinkNormalizationCacheability in core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php
Tests that link normalization cache information is not lost.

File

core/modules/jsonapi/src/Normalizer/Value/CacheableNormalization.php, line 55

Class

CacheableNormalization
Use to store normalized data and its cacheability.

Namespace

Drupal\jsonapi\Normalizer\Value

Code

public static function permanent($normalization) {
  return new static(new CacheableMetadata(), $normalization);
}