Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PlaceholderingRenderCache.php

function PlaceholderingRenderCache::getFromPlaceholderResultsCache

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.

1 call to PlaceholderingRenderCache::getFromPlaceholderResultsCache()
PlaceholderingRenderCache::get in core/lib/Drupal/Core/Render/PlaceholderingRenderCache.php
Gets the cached, pre-rendered element of a renderable element from cache.

File

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

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal