You are here

function jst_clock_admin_settings_submit in Javascript Timer 8

1 string reference to 'jst_clock_admin_settings_submit'
jst_clock_form_jstimer_admin_settings_alter in widgets/jst_clock.module
Implementation of hook_form_alter(). Add the clock widget specific settings to admin screen.

File

widgets/jst_clock.module, line 307
Embeddable clock widget (optional).

Code

function jst_clock_admin_settings_submit($form, FormStateInterface $form_state) {
  $config = \Drupal::configFactory()
    ->getEditable('jstimer.settings');
  $config
    ->set('jstimer_jst_clock_type', $form_state
    ->getValue('jstimer_jst_clock_type'));
  $config
    ->set('jst_clock_sva_file', $form_state
    ->getValue('jst_clock_sva_file'));
  $config
    ->save();
}