function pathauto_entity_bulk_update_form in Pathauto Entity 7
Form contructor for path alias bulk update form.
Overrides Pathauto's pathauto_bulk_update_form() to avoid grouping form options for custom entity types by their 'batch_update_callback' value (see issue https://drupal.org/node/2124379).
See also
pathauto_entity_bulk_update_form_submit()
1 string reference to 'pathauto_entity_bulk_update_form'
- pathauto_entity_menu_alter in ./
pathauto_entity.module - Implements hook_menu_alter().
File
- includes/
pathauto_entity.admin.inc, line 88 - Pathauto Entity admin callback implementations.
Code
function pathauto_entity_bulk_update_form() {
$form['#update_callbacks'] = array();
$form['update'] = array(
'#type' => 'checkboxes',
'#title' => t('Select the types of un-aliased paths for which to generate URL aliases'),
'#options' => array(),
'#default_value' => array(),
);
$pathauto_settings = module_invoke_all('pathauto', 'settings');
foreach ($pathauto_settings as $delta => $settings) {
if (!empty($settings->batch_update_callback)) {
// We cannot use just $delta value as an array key here,
// as for $delta == 0 the functionality would break.
$key = $settings->batch_update_callback . '_' . $delta;
$form['#update_callbacks'][$key] = $settings;
$form['update']['#options'][$key] = $settings->groupheader;
}
}
$form['actions']['#type'] = 'actions';
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Update'),
);
return $form;
}