You are here

function theme_vppr_form_admin_settings_vppr in Vocabulary Permissions Per Role 6

Theme helper for vppr_form_admin_settings_vppr().

File

./vppr.admin.inc, line 44
Vocabulary Permissions Per Role - administration UI

Code

function theme_vppr_form_admin_settings_vppr($form) {
  $header = array(
    FALSE,
  );
  foreach (element_children($form['vppr_roles']) as $rid) {
    $header[$rid] = drupal_render($form['vppr_roles'][$rid]);
  }
  $rows = array();
  foreach (element_children($form['vppr_vocabs']) as $vid) {
    $row = array(
      drupal_render($form['vppr_vocabs'][$vid]),
    );
    foreach (element_children($form['vppr_perms'][$vid]) as $rid) {
      $row[$rid] = drupal_render($form['vppr_perms'][$vid][$rid]);
    }
    $rows[$vid] = $row;
  }
  $buttons = drupal_render($form['buttons']);
  return theme('table', $header, $rows) . drupal_render($form) . $buttons;
}