Skip navigation
Help

theme_uc_roles_expiration

6 uc_roles.admin.inc theme_uc_roles_expiration($form)
7 uc_roles.admin.inc theme_uc_roles_expiration($variables)

Themes user role expiration page.

Parameters

$variables: An associative array containing:

  • form: A render element representing the form.

Related topics

File

ubercart/uc_roles/uc_roles.admin.inc, line 65
Roles administration menu items.

Code

function theme_uc_roles_expiration($variables) {
  $form = $variables['form'];

  $header = _uc_roles_expiration_header();
  $rows = array();

  if (isset($form['name'])) {
    foreach (element_children($form['name']) as $key) {
      $rows[] = array(
        drupal_render($form['name'][$key]),
        drupal_render($form['role'][$key]),
        drupal_render($form['expiration'][$key]),
        drupal_render($form['edit'][$key]),
        drupal_render($form['delete'][$key]),
      );
    }
  }

  $output = theme('table', array(
    'header' => $header, 
    'rows' => $rows, 
    'empty' => t('No expirations set to occur'),
  ));
  $output .= theme('pager');
  $output .= drupal_render_children($form);

  return $output;
}