You are here

function theme_navbar in Navbar 7

Returns HTML that wraps the administration navbar.

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_navbar()
navbar_element_info in ./navbar.module
Implements hook_element_info().

File

./navbar.module, line 311
Administration navbar for quick access to top level administration items.

Code

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