You are here

public function DeleteFolderForm::submitForm in Taxonomy File Tree 8

Same name and namespace in other branches
  1. 3.x src/Form/DeleteFolderForm.php \Drupal\tft\Form\DeleteFolderForm::submitForm()

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides FormInterface::submitForm

File

src/Form/DeleteFolderForm.php, line 99

Class

DeleteFolderForm
Delete a term form.

Namespace

Drupal\tft\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $term = Term::load($form_state
    ->getValue('tid'));
  $term
    ->delete();
}