You are here

public function TermForm::overview in Drupal 10

Same name and namespace in other branches
  1. 9 core/modules/taxonomy/src/TermForm.php \Drupal\taxonomy\TermForm::overview()

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 127

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'));
}