W3cubDocs

/Drupal 8

function drupal_render

drupal_render(&$elements, $is_recursive_call = FALSE)

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()

File

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!common.inc/function/drupal_render/8.1.x