public function RenderStack::convertRenderArrayFromD7 in Render cache 7.2
Converts a render array back to be compatible with Drupal 8.
This moves properties from ['#attached']['render_cache'] back to the root.
Parameters
array $render: The render array to convert.
Return value
array The converted render array.
Overrides RenderStackInterface::convertRenderArrayFromD7
File
- src/
Cache/ RenderStack.php, line 328 - Contains \Drupal\render_cache\Cache\RenderStack
Class
- RenderStack
- Defines the RenderStack service.
Namespace
Drupal\render_cache\CacheCode
public function convertRenderArrayFromD7($render) {
if (!empty($render['#attached']['render_cache'])) {
$render += $render['#attached']['render_cache'];
unset($render['#attached']['render_cache']);
}
return $render;
}