public static function Rev::preRenderRev in Workspace 8
Pre-render callback.
File
- src/
Element/ Rev.php, line 29
Class
- Rev
- Provides a render element for a items in a revision tree.
Namespace
Drupal\workspace\ElementCode
public static function preRenderRev($element) {
$info = [
'#uuid' => $element['#uuid'],
'#rev' => $element['#rev'],
'#rev_info' => $element['#rev_info'],
'#theme' => 'workspace_rev',
];
/** @var \Drupal\Core\Render\Renderer $renderer */
$renderer = \Drupal::service('renderer');
$element['#markup'] = $renderer
->render($info);
return $element;
}