domain_batch_list

Versions
domain
domain_batch_list($batch)

Lists available batch updates for the domain module.

Parameters

$batch An array of batch actions, as defined by hook_domainbatch().

Return value

A themed table of links and descriptions for batch actions.

Code

./domain.admin.inc, line 718

<?php
function domain_batch_list($batch) {
  $header = array(t('Action'), t('Description'));
  $rows = array();
  foreach ($batch as $key => $value) {
    if (!isset($value['#module'])) {
      $value['#module'] = t('Other');
    }
  }
  uasort($batch, 'domain_batch_sort');
  $group = '';
  foreach ($batch as $key => $value) {
    if ($group != $value['#module']) {
      $rows[] = array(array('data' => '<strong>'. t('%module options', array('%module' => $value['#module'])) .'</strong>', 'colspan' => 2));
      $group = $value['#module'];
    }
    $rows[] = array(l($value['#form']['#title'], 'admin/build/domain/batch/'. $key), $value['#meta_description']);
  }
  $output = '<p>'. t('Batch updates allow you to edit values for multiple domains at one time.  These functions are helpful when moving your sites from staging to production, or any time you need to make mass changes quickly.  The following batch update actions may be performed.') .'</p>';
  $output .= '<p><em>'. t('Note that you will only be shown domains on which each action may be performed.  If the module is not yet configured, some actions may be empty.') .'</em></p>';
  return $output . theme('table', $header, $rows);
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List