You are here

function ShadowboxGlobalSettingsForm::submitForm in Shadowbox 8

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

Overrides ConfigFormBase::submitForm

File

lib/Drupal/shadowbox/Form/ShadowboxGlobalSettingsForm.php, line 443
Contains \Drupal\shadowbox\Form\ShadowboxGlobalSettingsForm.

Class

ShadowboxGlobalSettingsForm
Configure the settings for Shadowbox.

Namespace

Drupal\shadowbox\Form

Code

function submitForm(array &$form, array &$form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('shadowbox.settings')
    ->set('shadowbox_location', $form_state['values']['shadowbox_location'])
    ->set('shadowbox_enabled', $form_state['values']['shadowbox_enabled'])
    ->set('shadowbox_activation_type', $form_state['values']['shadowbox_activation_type'])
    ->set('shadowbox_pages', $form_state['values']['shadowbox_pages'])
    ->set('shadowbox_animate', $form_state['values']['shadowbox_animate'])
    ->set('shadowbox_animate_fade', $form_state['values']['shadowbox_animate_fade'])
    ->set('shadowbox_animation_sequence', $form_state['values']['shadowbox_animation_sequence'])
    ->set('shadowbox_resize_duration', $form_state['values']['shadowbox_resize_duration'])
    ->set('shadowbox_fade_duration', $form_state['values']['shadowbox_fade_duration'])
    ->set('shadowbox_initial_height', $form_state['values']['shadowbox_initial_height'])
    ->set('shadowbox_initial_width', $form_state['values']['shadowbox_initial_width'])
    ->set('shadowbox_overlay_color', $form_state['values']['shadowbox_overlay_color'])
    ->set('shadowbox_overlay_opacity', $form_state['values']['shadowbox_overlay_opacity'])
    ->set('shadowbox_viewport_padding', $form_state['values']['shadowbox_viewport_padding'])
    ->set('shadowbox_display_nav', $form_state['values']['shadowbox_display_nav'])
    ->set('shadowbox_continuous_galleries', $form_state['values']['shadowbox_continuous_galleries'])
    ->set('shadowbox_display_counter', $form_state['values']['shadowbox_display_counter'])
    ->set('shadowbox_counter_type', $form_state['values']['shadowbox_counter_type'])
    ->set('shadowbox_counter_limit', $form_state['values']['shadowbox_counter_limit'])
    ->set('shadowbox_slideshow_delay', $form_state['values']['shadowbox_slideshow_delay'])
    ->set('shadowbox_autoplay_movies', $form_state['values']['shadowbox_autoplay_movies'])
    ->set('shadowbox_show_movie_controls', $form_state['values']['shadowbox_show_movie_controls'])
    ->set('shadowbox_youtube_quality', $form_state['values']['shadowbox_youtube_quality'])
    ->set('shadowbox_overlay_listen', $form_state['values']['shadowbox_overlay_listen'])
    ->set('shadowbox_enable_keys', $form_state['values']['shadowbox_enable_keys'])
    ->set('shadowbox_handle_oversize', $form_state['values']['shadowbox_handle_oversize'])
    ->set('shadowbox_handle_unsupported', $form_state['values']['shadowbox_handle_unsupported'])
    ->set('shadowbox_use_sizzle', $form_state['values']['shadowbox_use_sizzle'])
    ->save();
}