8.5.x common.inc drupal_render(&$elements, $is_recursive_call = FALSE)
8.0.x common.inc drupal_render(&$elements, $is_recursive_call = FALSE)
8.1.x common.inc drupal_render(&$elements, $is_recursive_call = FALSE)
8.2.x common.inc drupal_render(&$elements, $is_recursive_call = FALSE)
8.3.x common.inc drupal_render(&$elements, $is_recursive_call = FALSE)
8.4.x common.inc drupal_render(&$elements, $is_recursive_call = FALSE)
8.6.x common.inc drupal_render(&$elements, $is_recursive_call = FALSE)
5.x common.inc drupal_render(&$elements)
6.x common.inc drupal_render(&$elements)
7.x common.inc drupal_render(&$elements)

Renders HTML given a structured array tree.

Deprecated

as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Use the 'renderer' service instead.

See also

\Drupal\Core\Render\RendererInterface::render()

https://www.drupal.org/node/2912696

2 calls to drupal_render()
callback_batch_finished in core/lib/Drupal/Core/Form/form.api.php
Complete a batch process.
hook_tokens_alter in core/lib/Drupal/Core/Utility/token.api.php
Alter replacement values for placeholder tokens.

File

core/includes/common.inc, line 881
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);
}