You are here

function pathauto_bulk_update_form in Pathauto 7

Same name and namespace in other branches
  1. 6.2 pathauto.admin.inc \pathauto_bulk_update_form()

Form contructor for path alias bulk update form.

See also

pathauto_bulk_update_form_submit()

1 string reference to 'pathauto_bulk_update_form'
pathauto_menu in ./pathauto.module
Implements hook_menu().

File

./pathauto.admin.inc, line 257
Admin page callbacks for the Pathauto module.

Code

function pathauto_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 $settings) {
    if (!empty($settings->batch_update_callback)) {
      $form['#update_callbacks'][$settings->batch_update_callback] = $settings;
      $form['update']['#options'][$settings->batch_update_callback] = $settings->groupheader;
    }
  }
  $form['actions']['#type'] = 'actions';
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Update'),
  );
  return $form;
}