function ActiveWorkspaceTestForm::submitForm

Same name and namespace in other branches
  1. 11.x core/modules/workspaces/tests/modules/workspaces_test/src/Form/ActiveWorkspaceTestForm.php \Drupal\workspaces_test\Form\ActiveWorkspaceTestForm::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

core/modules/workspaces/tests/modules/workspaces_test/src/Form/ActiveWorkspaceTestForm.php, line 81

Class

ActiveWorkspaceTestForm
Form for testing the active workspace.

Namespace

Drupal\workspaces_test\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) : void {
  $this->keyValue
    ->set('form_test_active_workspace', $this->workspaceManager
    ->getActiveWorkspace()
    ->id());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.