diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDeleteForm.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDeleteForm.php index 1e610cb..260da6e 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDeleteForm.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDeleteForm.php @@ -22,9 +22,9 @@ class TermDeleteForm extends EntityNGConfirmFormBase implements EntityController /** * The taxonomy vocabulary storage controller. * - * @var \Drupal\Core\Entity\EntityStorageControllerInterface + * @var \Drupal\taxonomy\VocabularyStorageControllerInterface */ - protected $storageController; + protected $vocabularyStorageController; /** * Constructs a new TermDelete object. @@ -34,7 +34,7 @@ class TermDeleteForm extends EntityNGConfirmFormBase implements EntityController */ public function __construct(ModuleHandlerInterface $module_handler, VocabularyStorageControllerInterface $storage_controller) { parent::__construct($module_handler); - $this->storageController = $storage_controller; + $this->vocabularyStorageController = $storage_controller; } /** @@ -87,9 +87,11 @@ public function getConfirmText() { */ public function submit(array $form, array &$form_state) { $this->entity->delete(); - $vocabulary = $this->storageController->load(array($this->entity->bundle())); + $vocabulary = $this->vocabularyStorageController->load(array($this->entity->bundle())); + // @todo Move to storage controller http://drupal.org/node/1988712 taxonomy_check_vocabulary_hierarchy(reset($vocabulary), array('tid' => $this->entity->id())); + drupal_set_message(t('Deleted term %name.', array('%name' => $this->entity->label()))); watchdog('taxonomy', 'Deleted term %name.', array('%name' => $this->entity->label()), WATCHDOG_NOTICE); $form_state['redirect'] = 'admin/structure/taxonomy';