You are here

public function GatsbyFastbuildsAdminForm::submitForm in Gatsby Live Preview & Incremental Builds 8

Same name and namespace in other branches
  1. 2.0.x modules/gatsby_fastbuilds/src/Form/GatsbyFastbuildsAdminForm.php \Drupal\gatsby_fastbuilds\Form\GatsbyFastbuildsAdminForm::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

modules/gatsby_fastbuilds/src/Form/GatsbyFastbuildsAdminForm.php, line 80

Class

GatsbyFastbuildsAdminForm
Defines an admin for for Gatsby fastbuilds.

Namespace

Drupal\gatsby_fastbuilds\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('gatsby_fastbuilds.settings')
    ->set('log_published', $form_state
    ->getValue('log_published'))
    ->set('delete_log_entities', $form_state
    ->getValue('delete_log_entities'))
    ->set('log_expiration', $form_state
    ->getValue('log_expiration'))
    ->save();
}