You are here

public function WorkflowAccessSettingsForm::submitForm in Workflow 8

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 ConfigFormBase::submitForm

File

modules/workflow_access/src/Form/WorkflowAccessSettingsForm.php, line 66

Class

WorkflowAccessSettingsForm
Provides the base form for workflow add and edit forms.

Namespace

Drupal\workflow_access\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $weight = $form_state
    ->getValues()['workflow_access']['workflow_access_priority'];
  $this
    ->config('workflow_access.settings')
    ->set('workflow_access_priority', $weight)
    ->save();
  parent::submitForm($form, $form_state);
}