You are here

protected function Formatter::getCacheHash in RESTful 7.2

Gets the cached computed value for the fields to be rendered.

Parameters

mixed $data: The data to be rendered.

Return value

string The cache hash.

3 calls to Formatter::getCacheHash()
FormatterHalJson::extractFieldValues in src/Plugin/formatter/FormatterHalJson.php
Extracts the actual values from the resource fields.
FormatterJson::extractFieldValues in src/Plugin/formatter/FormatterJson.php
Extracts the actual values from the resource fields.
FormatterJsonApi::extractFieldValues in src/Plugin/formatter/FormatterJsonApi.php
Extracts the actual values from the resource fields.

File

src/Plugin/formatter/Formatter.php, line 151
Contains \Drupal\restful\Plugin\formatter\Formatter

Class

Formatter
Class Formatter.

Namespace

Drupal\restful\Plugin\formatter

Code

protected function getCacheHash($data) {
  if (!($render_cache = $this
    ->createCacheController($data))) {
    return NULL;
  }
  return $render_cache
    ->getCid();
}