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

40 calls to drupal_render()
action_views_form_substitutions in core/modules/action/action.views_execution.inc
Implements hook_views_form_substitutions().
Analyzer::formatMessages in core/modules/views/src/Analyzer.php
Formats the analyze result into a message string.
BookAdminEditForm::bookAdminTableTree in core/modules/book/src/Form/BookAdminEditForm.php
Helps build the main table in the book administration page form.
BreakLockForm::getDescription in core/modules/views_ui/src/Form/BreakLockForm.php
Returns additional text to display as a description.
callback_batch_finished in core/lib/Drupal/Core/Form/form.api.php
Complete a batch process.

... See full list

2 string references to 'drupal_render'
RendererBubblingTest::testBubblingWithoutPreRender in core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
Tests bubbling of assets when NOT using #pre_render callbacks.
RendererPlaceholdersTest::generatePlaceholdersWithChildrenTestElement in core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
Generates an element with placeholders at 3 levels.

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);
}