You are here

public function NgLightboxSettingsForm::submitForm in NG Lightbox 8

Same name and namespace in other branches
  1. 2.x src/Form/NgLightboxSettingsForm.php \Drupal\ng_lightbox\Form\NgLightboxSettingsForm::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/NgLightboxSettingsForm.php, line 91

Class

NgLightboxSettingsForm

Namespace

Drupal\ng_lightbox\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $this->config
    ->set('patterns', $values['patterns'])
    ->set('default_width', $values['default_width'])
    ->set('lightbox_class', $values['lightbox_class'])
    ->set('skip_admin_paths', $values['skip_admin_paths'])
    ->set('renderer', $values['renderer'])
    ->save();
}