You are here

function theme_config_perms_form in Custom Permissions 7.2

Same name and namespace in other branches
  1. 6.2 config_perms.admin.inc \theme_config_perms_form()

Administration form theme function

1 theme call to theme_config_perms_form()
config_perms_admin_form in ./config_perms.admin.inc
Administration form

File

./config_perms.admin.inc, line 121
Admin pages

Code

function theme_config_perms_form($variables) {
  $form = $variables['form'];
  $header = array(
    t('Enabled'),
    t('Delete'),
    t('Name'),
    t('Path(s)'),
  );
  $rows = array();
  foreach (element_children($form) as $key) {
    $row = array();
    $row[] = drupal_render($form[$key]['status']);
    $row[] = drupal_render($form[$key]['remove']);
    $row[] = drupal_render($form[$key]['name']);
    $row[] = drupal_render($form[$key]['path']);
    $rows[] = array(
      'data' => $row,
      'id' => array(
        $key,
      ),
    );
  }
  $output = theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
  $output .= drupal_render_children($form);
  return $output;
}