public function DateAPStyleSettings::submitForm in AP Style Date 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/ DateAPStyleSettings.php, line 137
Class
- DateAPStyleSettings
- Configuration for the default AP Style Date settings.
Namespace
Drupal\date_ap_style\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$this
->config('date_ap_style.dateapstylesettings')
->set('date_ap_style_settings', $form_state
->getValue('date_ap_style_settings'))
->set('always_display_year', $form_state
->getValue('always_display_year'))
->set('use_today', $form_state
->getValue('use_today'))
->set('cap_today', $form_state
->getValue('cap_today'))
->set('display_day', $form_state
->getValue('display_day'))
->set('display_time', $form_state
->getValue('display_time'))
->set('time_before_date', $form_state
->getValue('time_before_date'))
->set('use_all_day', $form_state
->getValue('use_all_day'))
->set('display_noon_and_midnight', $form_state
->getValue('display_noon_and_midnight'))
->set('capitalize_noon_and_midnight', $form_state
->getValue('capitalize_noon_and_midnight'))
->set('timezone', $form_state
->getValue('timezone'))
->save();
}