function taxonomy_vocabulary_confirm_delete

Form builder for the vocabulary delete confirmation form.

See also

taxonomy_vocabulary_confirm_delete_submit()

Related topics

1 call to taxonomy_vocabulary_confirm_delete()
VocabularyFormController::form in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php
Overrides Drupal\Core\Entity\EntityFormController::form().

File

drupal/core/modules/taxonomy/taxonomy.admin.inc, line 451
Administrative page callbacks for the taxonomy module.

Code

function taxonomy_vocabulary_confirm_delete($form, &$form_state, $vid) {
  $vocabulary = taxonomy_vocabulary_load($vid);

  // Always provide entity id in the same form key as in the entity edit form.
  $form['vid'] = array(
    '#type' => 'value',
    '#value' => $vid,
  );
  $form_state['taxonomy']['vocabulary'] = $vocabulary;
  $form['#id'] = 'taxonomy_vocabulary_confirm_delete';
  $form['type'] = array(
    '#type' => 'value',
    '#value' => 'vocabulary',
  );
  $form['name'] = array(
    '#type' => 'value',
    '#value' => $vocabulary->name,
  );
  $form['#submit'] = array(
    'taxonomy_vocabulary_confirm_delete_submit',
  );
  return confirm_form($form, t('Are you sure you want to delete the vocabulary %title?', array(
    '%title' => $vocabulary
      ->label(),
  )), 'admin/structure/taxonomy', t('Deleting a vocabulary will delete all the terms in it. This action cannot be undone.'), t('Delete'), t('Cancel'));
}