function RenderCacheInterface::set
Same name in other branches
- 9 core/lib/Drupal/Core/Render/RenderCacheInterface.php \Drupal\Core\Render\RenderCacheInterface::set()
- 10 core/lib/Drupal/Core/Render/RenderCacheInterface.php \Drupal\Core\Render\RenderCacheInterface::set()
- 11.x core/lib/Drupal/Core/Render/RenderCacheInterface.php \Drupal\Core\Render\RenderCacheInterface::set()
Caches the rendered output of a renderable array.
May be called by an implementation of \Drupal\Core\Render\RendererInterface while rendering, if the #cache property is set.
Parameters
array $elements: A renderable array.
array $pre_bubbling_elements: A renderable array corresponding to the state (in particular, the cacheability metadata) of $elements prior to the beginning of its rendering process, and therefore before any bubbling of child information has taken place. Only the #cache property is used by this function, so the caller may omit all other properties and children from this array.
Return value
bool|null Returns FALSE if no cache item could be created, NULL otherwise.
See also
::get()
1 method overrides RenderCacheInterface::set()
- RenderCache::set in core/
lib/ Drupal/ Core/ Render/ RenderCache.php - Caches the rendered output of a renderable array.
File
-
core/
lib/ Drupal/ Core/ Render/ RenderCacheInterface.php, line 71
Class
- RenderCacheInterface
- Defines an interface for caching rendered render arrays.
Namespace
Drupal\Core\RenderCode
public function set(array &$elements, array $pre_bubbling_elements);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.