class VocabularyDeleteForm

Same name and namespace in other branches
  1. 11.x core/modules/taxonomy/src/Form/VocabularyDeleteForm.php \Drupal\taxonomy\Form\VocabularyDeleteForm
  2. 10 core/modules/taxonomy/src/Form/VocabularyDeleteForm.php \Drupal\taxonomy\Form\VocabularyDeleteForm
  3. 8.9.x core/modules/taxonomy/src/Form/VocabularyDeleteForm.php \Drupal\taxonomy\Form\VocabularyDeleteForm

Provides a deletion confirmation form for taxonomy vocabulary.

@internal

Hierarchy

Expanded class hierarchy of VocabularyDeleteForm

File

core/modules/taxonomy/src/Form/VocabularyDeleteForm.php, line 12

Namespace

Drupal\taxonomy\Form
View source
class VocabularyDeleteForm extends EntityDeleteForm {
  
  /**
   * {@inheritdoc}
   */
  public function getFormId() {
    return 'taxonomy_vocabulary_confirm_delete';
  }
  
  /**
   * {@inheritdoc}
   */
  public function getQuestion() {
    return $this->t('Are you sure you want to delete the vocabulary %title?', [
      '%title' => $this->entity
        ->label(),
    ]);
  }
  
  /**
   * {@inheritdoc}
   */
  public function getDescription() {
    return $this->t('Deleting a vocabulary will delete all the terms in it. This action cannot be undone.');
  }
  
  /**
   * {@inheritdoc}
   */
  protected function getDeletionMessage() {
    return $this->t('Deleted vocabulary %name.', [
      '%name' => $this->entity
        ->label(),
    ]);
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.