function theme_autologout_render_table in Automated Logout 6.4
Same name and namespace in other branches
- 7.4 autologout.module \theme_autologout_render_table()
Themeing function for admin roles table.
1 theme call to theme_autologout_render_table()
- autologout_settings in ./
autologout.admin.inc - Settings form for menu callback
File
- ./
autologout.module, line 205 - Used to automagically log out a user after a preset time.
Code
function theme_autologout_render_table($variables) {
$output = '';
if ($variables) {
$element = $variables['autologout_roles'];
}
$header = array(
t('Enable'),
t('Role Name'),
t('Timeout (seconds)'),
);
$rows = array();
foreach (user_roles(TRUE) as $key => $role) {
$rows[] = array(
drupal_render($element['autologout_role_' . $key]),
t($role),
drupal_render($element['autologout_role_' . $key . '_timeout']),
);
}
$table = theme_table($header, $rows, $attributes = array(), $caption = NULL);
$output .= $table;
return $output;
}