function RenderCacheInterface::getMultiple

Gets multiple cached, pre-rendered elements from cache.

Parameters

array $multiple_elements: An associative array keyed by arbitrary identifiers, where the value is what you would otherwise pass to ::get(). Example:

$items = [
    'item_a' => $elements_a,
    'item_b' => $elements_b,
];

Return value

array An associative array keyed by the same keys as $multiple_elements, containing the original element and all its children pre-rendered. Items whose cached copy was not available are not returned.

See also

\Drupal\Core\Render\RenderCacheInterface::get()

1 method overrides RenderCacheInterface::getMultiple()
RenderCache::getMultiple in core/lib/Drupal/Core/Render/RenderCache.php
Gets multiple cached, pre-rendered elements from cache.

File

core/lib/Drupal/Core/Render/RenderCacheInterface.php, line 70

Class

RenderCacheInterface
Defines an interface for caching rendered render arrays.

Namespace

Drupal\Core\Render

Code

public function getMultiple(array $multiple_elements) : array;

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