You are here

public function SettingsController::submitForm in Hijri 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/SettingsController.php, line 164
Contains \Drupal\hijri\Form\SettingsController.

Class

SettingsController

Namespace

Drupal\hijri\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('hijri.config')
    ->set('correction_value', $form_state
    ->getValue('hijri_correction_value'))
    ->set('hijri_types', $form_state
    ->getValue('hijri_types'))
    ->set('hijri_display', $form_state
    ->getValue('hijri_display'))
    ->set('hijri_comment_display', $form_state
    ->getValue('hijri_comment_display'))
    ->set('hijri_display_block', $form_state
    ->getValue('hijri_display_block'))
    ->save();
  parent::submitForm($form, $form_state);
}