You are here

function ShadowboxAutomaticSettingsForm::submitForm in Shadowbox 8

Implements \Drupal\Core\Form\FormInterface::submitForm().

Overrides ConfigFormBase::submitForm

File

lib/Drupal/shadowbox/Form/ShadowboxAutomaticSettingsForm.php, line 54
Contains \Drupal\shadowbox\Form\ShadowboxAutomaticSettingsForm.

Class

ShadowboxAutomaticSettingsForm
Configure automatic settings for this site.

Namespace

Drupal\shadowbox\Form

Code

function submitForm(array &$form, array &$form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('shadowbox.automatic')
    ->set('shadowbox_auto_enable_all_images', $form_state['values']['shadowbox_auto_enable_all_images'])
    ->set('shadowbox_auto_gallery', $form_state['values']['shadowbox_auto_gallery'])
    ->set('shadowbox_enable_globally', $form_state['values']['shadowbox_enable_globally'])
    ->save();
}