function drupal_render in Drupal 8
Same name and namespace in other branches
- 5 includes/common.inc \drupal_render()
- 6 includes/common.inc \drupal_render()
- 7 includes/common.inc \drupal_render()
Renders HTML given a structured array tree.
Deprecated
in drupal:8.0.0 and is removed from drupal:9.0.0. Use the 'renderer' service instead.
See also
\Drupal\Core\Render\RendererInterface::render()
https://www.drupal.org/node/2912696
File
- core/
includes/ common.inc, line 811 - Common functions that many Drupal modules will need to reference.
Code
function drupal_render(&$elements, $is_recursive_call = FALSE) {
return \Drupal::service('renderer')
->render($elements, $is_recursive_call);
}