function drupal_render_children

Renders children of an element and concatenates them.

This renders all children of an element using drupal_render() and then joins them together into a single string.

Parameters

$element: The structured array whose children shall be rendered.

$children_keys: If the keys of the element's children are already known, they can be passed in to save another run of element_children().

42 calls to drupal_render_children()
template_preprocess_block_admin_display_form in drupal/core/modules/block/block.admin.inc
Processes variables for block-admin-display-form.tpl.php.
template_preprocess_poll_vote in drupal/core/modules/poll/poll.module
Implements template_preprocess_HOOK() for poll-vote.tpl.php.
template_preprocess_views_exposed_form in drupal/core/modules/views/theme/theme.inc
Default theme function for all filter forms.
theme_aggregator_categorize_items in drupal/core/modules/aggregator/aggregator.pages.inc
Returns HTML for the aggregator page list form for assigning categories.
theme_color in drupal/core/includes/form.inc
Returns HTML for a color form element.

... See full list

File

drupal/core/includes/common.inc, line 5524
Common functions that many Drupal modules will need to reference.

Code

function drupal_render_children(&$element, $children_keys = NULL) {
  if ($children_keys === NULL) {
    $children_keys = element_children($element);
  }
  $output = '';
  foreach ($children_keys as $key) {
    if (!empty($element[$key])) {
      $output .= drupal_render($element[$key]);
    }
  }
  return $output;
}