You are here

public function MaestroEngineSettingsForm::submitForm in Maestro 8.2

Same name and namespace in other branches
  1. 3.x src/Form/MaestroEngineSettingsForm.php \Drupal\maestro\Form\MaestroEngineSettingsForm::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 ConfigFormBase::submitForm

File

src/Form/MaestroEngineSettingsForm.php, line 92

Class

MaestroEngineSettingsForm
Configure settings for this site.

Namespace

Drupal\maestro\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('maestro.settings')
    ->set('maestro_send_notifications', $form_state
    ->getValue('maestro_send_notifications'))
    ->save();
  $this
    ->config('maestro.settings')
    ->set('maestro_orchestrator_task_console', $form_state
    ->getValue('maestro_orchestrator_task_console'))
    ->save();
  $this
    ->config('maestro.settings')
    ->set('maestro_redirect_location', $form_state
    ->getValue('maestro_redirect_location'))
    ->save();
  $this
    ->config('maestro.settings')
    ->set('maestro_orchestrator_token', $form_state
    ->getValue('maestro_orchestrator_token'))
    ->save();
  $this
    ->config('maestro.settings')
    ->set('maestro_orchestrator_lock_execution_time', $form_state
    ->getValue('maestro_orchestrator_lock_execution_time'))
    ->save();
  $this
    ->config('maestro.settings')
    ->set('maestro_orchestrator_development_mode', $form_state
    ->getValue('maestro_orchestrator_development_mode'))
    ->save();
  parent::submitForm($form, $form_state);
}