You are here

function theme_pagination_admin_settings in Pagination (Node) 6

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

@desc Themes the admin form as a table

1 string reference to 'theme_pagination_admin_settings'
pagination_theme in ./pagination.module
@desc Implementation of hook_theme()

File

./pagination.module, line 223
pagination.module @desc Allow for arbitrary nodes to be paginated. administrators can set which nodes they wish to paginate, and the length of content required to split a node into pages. Alternatively, content creators can set manual break points…

Code

function theme_pagination_admin_settings($form) {
  $header = array(
    t('Content type'),
    t('Pagination'),
    t('Pagination style'),
  );
  $rows = array();
  foreach ($form as $type => $cell) {

    // We just want rows of actual data, not form meta-data.
    if (isset($cell['pagination']) and is_array($cell['pagination'])) {
      $rows[] = array(
        $type,
        drupal_render($cell['pagination']),
        drupal_render($cell['style']),
      );
      unset($form[$type]);
    }
  }
  $output = theme('table', $header, $rows);
  $output .= drupal_render($form);
  return $output;
}