public static function signed_in($user, $loginfailures, $mnet, $real, $role_switch, $logout)
 {
     $links[] = bootstrap::li_icon_link($user['link'], 'user', 'Profile');
     if ($mnet !== null) {
         $links[] = bootstrap::li_icon_link($mnet['link'], 'globe', $mnet['name']);
     }
     if (isset($loginfailures)) {
         $links[] = bootstrap::li_icon_link($loginfailures['link'], 'warning-sign', $loginfailures['name']);
         $user['name'] .= ' ' . bootstrap::icon('warning-sign');
     }
     if ($role_switch !== null) {
         $links[] = bootstrap::li_icon_link($role_switch['link'], 'repeat', $role_switch['name']);
     }
     if ($real !== null) {
         $links[] = bootstrap::li_icon_link($real['link'], 'user', $real['name']);
     }
     $links[] = bootstrap::list_divider();
     $links[] = bootstrap::li_icon_link($logout['link'], 'off', $logout['name']);
     return html::ul('nav pull-right', bootstrap::dropdown_menu($user['name'], $links));
 }
 protected function render_custom_menu_item(custom_menu_item $menunode, $submenu = null)
 {
     if ('list_divider' === $menunode->get_text()) {
         return bootstrap::list_divider();
     }
     if (!$menunode->has_children()) {
         return $this->render_custom_menu_leaf($menunode);
     }
     foreach ($menunode->get_children() as $child) {
         $items[] = $this->render_custom_menu_item($child, true);
     }
     if ($submenu === true) {
         return html::li(bootstrap::dropdown_submenu($menunode->get_text(), $items));
     } else {
         return html::li(bootstrap::dropdown_menu($menunode->get_text(), $items));
     }
 }