function domain_batch_list in Domain Access 6.2
Same name and namespace in other branches
- 5 domain_admin.inc \domain_batch_list()
- 7.3 domain.admin.inc \domain_batch_list()
- 7.2 domain.admin.inc \domain_batch_list()
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.
1 call to domain_batch_list()
- domain_batch in ./
domain.admin.inc - Allows for the batch update of certain elements.
File
- ./
domain.admin.inc, line 726 - Administration functions for the domain module.
Code
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) {
$permission = isset($value['#permission']) ? $value['#permission'] : 'administer domains';
if (!user_access($permission)) {
continue;
}
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);
}