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