Same filename and directory in other branches
- 8.9.x core/modules/taxonomy/src/Form/TermDeleteForm.php
- 9 core/modules/taxonomy/src/Form/TermDeleteForm.php
Namespace
Drupal\taxonomy\Form
File
core/modules/taxonomy/src/Form/TermDeleteForm.php
View source
<?php
namespace Drupal\taxonomy\Form;
use Drupal\Core\Entity\ContentEntityDeleteForm;
use Drupal\Core\Url;
class TermDeleteForm extends ContentEntityDeleteForm {
public function getCancelUrl() {
return new Url('entity.taxonomy_vocabulary.collection');
}
protected function getRedirectUrl() {
return $this
->getCancelUrl();
}
public function getDescription() {
return $this
->t('Deleting a term will delete all its children if there are any. This action cannot be undone.');
}
protected function getDeletionMessage() {
return $this
->t('Deleted term %name.', [
'%name' => $this->entity
->label(),
]);
}
}
Classes