class TermDeleteForm
Same name and namespace in other branches
- 11.x core/modules/taxonomy/src/Form/TermDeleteForm.php \Drupal\taxonomy\Form\TermDeleteForm
Provides a deletion confirmation form for taxonomy term.
@internal
Hierarchy
- class \Drupal\Core\Form\FormBase extends \Drupal\Core\Form\FormInterface, \Drupal\Core\DependencyInjection\ContainerInjectionInterface uses \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Logger\LoggerChannelTrait, \Drupal\Core\Messenger\MessengerTrait, \Drupal\Core\Routing\RedirectDestinationTrait, \Drupal\Core\StringTranslation\StringTranslationTrait
- class \Drupal\Core\Entity\EntityForm extends \Drupal\Core\Entity\EntityFormInterface implements \Drupal\Core\Form\FormBase
- class \Drupal\Core\Entity\ContentEntityForm extends \Drupal\Core\Entity\ContentEntityFormInterface implements \Drupal\Core\Entity\EntityForm
- class \Drupal\Core\Entity\ContentEntityConfirmFormBase extends \Drupal\Core\Form\ConfirmFormInterface implements \Drupal\Core\Entity\ContentEntityForm
- class \Drupal\Core\Entity\ContentEntityDeleteForm uses \Drupal\Core\Entity\EntityDeleteFormTrait implements \Drupal\Core\Entity\ContentEntityConfirmFormBase
- class \Drupal\taxonomy\Form\TermDeleteForm implements \Drupal\Core\Entity\ContentEntityDeleteForm
- class \Drupal\Core\Entity\ContentEntityDeleteForm uses \Drupal\Core\Entity\EntityDeleteFormTrait implements \Drupal\Core\Entity\ContentEntityConfirmFormBase
- class \Drupal\Core\Entity\ContentEntityConfirmFormBase extends \Drupal\Core\Form\ConfirmFormInterface implements \Drupal\Core\Entity\ContentEntityForm
- class \Drupal\Core\Entity\ContentEntityForm extends \Drupal\Core\Entity\ContentEntityFormInterface implements \Drupal\Core\Entity\EntityForm
- class \Drupal\Core\Entity\EntityForm extends \Drupal\Core\Entity\EntityFormInterface implements \Drupal\Core\Form\FormBase
Expanded class hierarchy of TermDeleteForm
File
-
core/
modules/ taxonomy/ src/ Form/ TermDeleteForm.php, line 13
Namespace
Drupal\taxonomy\FormView source
class TermDeleteForm extends ContentEntityDeleteForm {
/**
* {@inheritdoc}
*/
public function getCancelUrl() {
// The cancel URL is the vocabulary collection, terms have no global
// list page.
return new Url('entity.taxonomy_vocabulary.collection');
}
/**
* {@inheritdoc}
*/
protected function getRedirectUrl() {
return $this->getCancelUrl();
}
/**
* {@inheritdoc}
*/
public function getDescription() {
return $this->t('Deleting a term will delete all its children if there are any. This action cannot be undone.');
}
/**
* {@inheritdoc}
*/
protected function getDeletionMessage() {
return $this->t('Deleted term %name.', [
'%name' => $this->entity
->label(),
]);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.