function theme_toolbar

Returns HTML that wraps the administration toolbar.

Parameters

array $variables: An associative array containing:

  • element: An associative array containing the properties and children of the tray. Properties used: #children, #attributes and #bar.
1 theme call to theme_toolbar()
toolbar_element_info in drupal/core/modules/toolbar/toolbar.module
Implements hook_element_info().

File

drupal/core/modules/toolbar/toolbar.module, line 230
Administration toolbar for quick access to top level administration items.

Code

function theme_toolbar(&$variables) {
  if (!empty($variables['element']['#children'])) {
    $element = $variables['element'];
    $trays = '';
    foreach (element_children($element) as $key) {
      $trays .= drupal_render($element[$key]['tray']);
    }
    return '<nav' . new Attribute($element['#attributes']) . '>' . '<div' . new Attribute($element['#bar']['#attributes']) . '>' . '<h2 class="element-invisible">' . $element['#bar']['#heading'] . '</h2>' . $element['#children'] . '</div>' . $trays . '</nav>';
  }
}