You are here

function theme_pagination_admin_settings in Pagination (Node) 7

Same name and namespace in other branches
  1. 6 pagination.module \theme_pagination_admin_settings()

Theme function for the admin settings form.

See also

pagination_admin_settings()

File

./pagination.module, line 111

Code

function theme_pagination_admin_settings($variables) {
  $form = $variables['form'];
  $form['#theme'] = NULL;
  $header = array(
    t('Content type'),
    t('Pagination'),
    t('Pagination style'),
  );
  $rows = array();
  foreach ($form as $type => $cell) {
    if (is_array($cell) && isset($cell['pagination']) && is_array($cell['pagination'])) {
      $rows[] = array(
        $type,
        drupal_render($cell['pagination']),
        drupal_render($cell['style']),
      );
      unset($form[$type]);
    }
  }
  $output = theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
  $output .= drupal_render($form);
  return $output;
}