function theme_domain_roles_form in Domain Access 6.2
Same name and namespace in other branches
- 7.3 domain.admin.inc \theme_domain_roles_form()
- 7.2 domain.admin.inc \theme_domain_roles_form()
FormsAPI
File
- ./
domain.admin.inc, line 1122 - Administration functions for the domain module.
Code
function theme_domain_roles_form($form) {
$output = '';
$header = array(
t('Domains'),
);
$rows = array();
$roles = user_roles();
$roles[0] = t('new user');
ksort($roles);
$domains = domain_domains();
foreach ($roles as $rid => $role) {
$header[] = $role;
}
foreach ($domains as $domain_id => $domain) {
$row = array();
if ($domain_id == 0) {
$domain_id = -1;
}
$row[] = filter_xss_admin($domain['sitename']);
foreach ($roles as $rid => $role) {
$form['domain_roles'][$rid][$domain_id]['#title'] = '';
$row[] = drupal_render($form['domain_roles'][$rid][$domain_id]);
}
$rows[] = $row;
}
$output .= drupal_render($form['domain_add_roles']);
$output .= theme('table', $header, $rows);
$output .= drupal_render($form);
return $output;
}