You are here

public function RenderStack::convertRenderArrayToD7 in Render cache 7.2

Converts a render array to be compatible with Drupal 7.

This moves Drupal 8 properties into ['#attached']['render_cache'].

Parameters

array $render: The render array to convert.

Return value

array The converted render array.

Overrides RenderStackInterface::convertRenderArrayToD7

File

src/Cache/RenderStack.php, line 319
Contains \Drupal\render_cache\Cache\RenderStack

Class

RenderStack
Defines the RenderStack service.

Namespace

Drupal\render_cache\Cache

Code

public function convertRenderArrayToD7($render) {
  $render['#attached']['render_cache'] = $this
    ->collectAndRemoveD8Properties($render);
  return $render;
}