You are here

function theme_hosting_queues_configure in Hosting 7.3

Same name and namespace in other branches
  1. 5 hosting.module \theme_hosting_queues_configure()
  2. 6.2 hosting.module \theme_hosting_queues_configure()
  3. 7.4 hosting.module \theme_hosting_queues_configure()

Theme function to render the queue configuration form.

See also

hosting_queues_configure()

File

./hosting.module, line 1007
Hosting module.

Code

function theme_hosting_queues_configure($variables) {
  $form = $variables['form'];
  $queues = hosting_get_queues();
  $rows = array();
  $header = array(
    '',
    t('Description'),
    array(
      'data' => t('Frequency'),
      'class' => array(
        'hosting-queue-frequency-head',
      ),
    ),
    t('Last run'),
  );
  foreach ($queues as $key => $info) {
    $row = array();
    $row[] = drupal_render($form[$key]['enabled']);
    $row[] = drupal_render($form[$key]['description']);
    $row[] = drupal_render($form[$key]['frequency']);
    $row[] = drupal_render($form[$key]['last_run']);
    $rows[] = $row;
  }
  $output = theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
  $output .= drupal_render($form['help']);
  $output .= drupal_render($form['submit']);
  $output .= drupal_render_children($form);
  return $output;
}