You are here

public function TaxonomyManagerForm::submitForm in Taxonomy Manager 2.0.x

Same name and namespace in other branches
  1. 8 src/Form/TaxonomyManagerForm.php \Drupal\taxonomy_manager\Form\TaxonomyManagerForm::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/TaxonomyManagerForm.php, line 309

Class

TaxonomyManagerForm
Taxonomy manager class.

Namespace

Drupal\taxonomy_manager\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $form_state
    ->getValue([
    'taxonomy',
    'manager',
    'tree',
  ]);
  $url = Url::fromRoute('taxonomy_manager.admin_vocabulary', array(
    'taxonomy_vocabulary' => $form_state
      ->getValue([
      'vocabulary_switcher',
    ]),
  ));
  $form_state
    ->setRedirectUrl($url);
}