You are here

function theme_acquia_lift_navbar in Acquia Lift Connector 7

Same name and namespace in other branches
  1. 7.2 theme/acquia_lift.navbar.theme.inc \theme_acquia_lift_navbar()

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_acquia_lift_navbar()
acquia_lift_element_info in ./acquia_lift.module
Implements hook_element_info().

File

theme/acquia_lift.navbar.theme.inc, line 18
acquia_lift.navbar.theme.inc Provides theme functions for Acquia Lift unified navigation bar.

Code

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