function theme_book_access_ui_settings in Book access 6.2
Same name and namespace in other branches
- 7.2 book_access_ui.admin.inc \theme_book_access_ui_settings()
Themes the settings fieldset added to the book settings page.
Parameters
$form: The form to render.
See also
book_access_ui_form_book_admin_settings_alter()
1 theme call to theme_book_access_ui_settings()
- book_access_ui_form_book_admin_settings_alter in ./
book_access_ui.module - Implements hook_form_FORM_ID_alter() for book_admin_settings().
File
- ./
book_access_ui.admin.inc, line 417 - Administration interface for the Book access module.
Code
function theme_book_access_ui_settings($form) {
$header = array(
t('Access type'),
);
$options = $form['#options'];
$rows = array();
foreach ($options as $option => $title) {
$header[] = $title;
}
foreach (element_children($form['grants']) as $key) {
$row = array();
$row[] = $form['grants'][$key]['#title'];
unset($form['grants'][$key]['#title']);
foreach ($options as $option => $title) {
$row[] = drupal_render($form['grants'][$key][$option]);
}
$rows[] = $row;
}
return drupal_render($form['info']) . theme('table', $header, $rows) . drupal_render($form);
}