You are here

public function TermForm::overview in Drupal 9

Form submission handler for the 'overview' action.

Parameters

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

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

File

core/modules/taxonomy/src/TermForm.php, line 123

Class

TermForm
Base for handler for taxonomy term edit forms.

Namespace

Drupal\taxonomy

Code

public function overview(array $form, FormStateInterface $form_state) : void {
  $vocabulary = $this->entityTypeManager
    ->getStorage('taxonomy_vocabulary')
    ->load($form_state
    ->getValue('vid'));
  $form_state
    ->setRedirectUrl($vocabulary
    ->toUrl('overview-form'));
}