You are here

public function WorkbenchAccessConfigForm::submitForm in Workbench Access 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

src/Form/WorkbenchAccessConfigForm.php, line 45

Class

WorkbenchAccessConfigForm
Configure Workbench access settings for this site.

Namespace

Drupal\workbench_access\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('workbench_access.settings');
  $config
    ->set('deny_on_empty', $form_state
    ->getValue('deny_on_empty'))
    ->save();
  parent::submitForm($form, $form_state);
}