Full ELMS Learning Network documentation
function theme_user_admin_permissions
×
Error message
User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).cis7 user.admin.inc | theme_user_admin_permissions($variables) |
cle7 user.admin.inc | theme_user_admin_permissions($variables) |
elmsmedia7 user.admin.inc | theme_user_admin_permissions($variables) |
icor7 user.admin.inc | theme_user_admin_permissions($variables) |
meedjum_blog7 user.admin.inc | theme_user_admin_permissions($variables) |
mooc7 user.admin.inc | theme_user_admin_permissions($variables) |
Returns HTML for the administer permissions page.
Parameters
$variables: An associative array containing:
- form: A render element representing the form.
Related topics
3 string references to the theme hook from theme_user_admin_permissions()
Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.
- admin_menu_form_alter in sites/
all/ modules/ ulmus/ admin_menu/ admin_menu.module - Implements hook_form_alter().
- user_menu in modules/
user/ user.module - Implements hook_menu().
- user_theme in modules/
user/ user.module - Implements hook_theme().
File
- modules/
user/ user.admin.inc, line 773 - Admin page callback file for the user module.
Code
function theme_user_admin_permissions($variables) {
$form = $variables['form'];
$roles = user_roles();
foreach (element_children($form['permission']) as $key) {
$row = array();
// Module name
if (is_numeric($key)) {
$row[] = array(
'data' => drupal_render($form['permission'][$key]),
'class' => array('module'),
'id' => 'module-' . $form['permission'][$key]['#id'],
'colspan' => count($form['role_names']['#value']) + 1,
);
}
else {
// Permission row.
$row[] = array(
'data' => drupal_render($form['permission'][$key]),
'class' => array('permission'),
);
foreach (element_children($form['checkboxes']) as $rid) {
$form['checkboxes'][$rid][$key]['#title'] = $roles[$rid] . ': ' . $form['permission'][$key]['#markup'];
$form['checkboxes'][$rid][$key]['#title_display'] = 'invisible';
$row[] = array(
'data' => drupal_render($form['checkboxes'][$rid][$key]),
'class' => array('checkbox'),
);
}
}
$rows[] = $row;
}
$header[] = (t('Permission'));
foreach (element_children($form['role_names']) as $rid) {
$header[] = array(
'data' => drupal_render($form['role_names'][$rid]),
'class' => array('checkbox'),
);
}
$output = theme('system_compact_link');
$output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'permissions')));
$output .= drupal_render_children($form);
return $output;
}