PlaceholderingRenderCache::getFromPlaceholderResultsCache

protected PlaceholderingRenderCache::getFromPlaceholderResultsCache(array $elements)

Retrieves an auto-placeholdered renderable array from the static cache.

Parameters

array $elements: A renderable array.

Return value

array|false A renderable array, with the original element and all its children pre- rendered, or FALSE if no cached copy of the element is available.

File

core/lib/Drupal/Core/Render/PlaceholderingRenderCache.php, line 179

Class

PlaceholderingRenderCache
Adds automatic placeholdering to the RenderCache.

Namespace

Drupal\Core\Render

Code

protected function getFromPlaceholderResultsCache(array $elements) {
  $placeholder_element = $this->placeholderGenerator->createPlaceholder($elements);
  $placeholder = (string) $placeholder_element['#markup'];
  if (isset($this->placeholderResultsCache[$placeholder])) {
    return $this->placeholderResultsCache[$placeholder];
  }
  return FALSE;
}
doc_Drupal
2016-10-29 09:34:12
Comments
Leave a Comment

Please login to continue.