public function DeleteFolderForm::submitForm in Taxonomy File Tree 8
Same name and namespace in other branches
- 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\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$term = Term::load($form_state
->getValue('tid'));
$term
->delete();
}