public function IntervalsForm::submitForm in Subscriptions 2.0.x
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/ IntervalsForm.php, line 92
Class
- IntervalsForm
- Defines the intervals settings form.
Namespace
Drupal\subscriptions\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
// Set values from the form.
$form_state
->cleanValues();
$config = $this
->config('subscriptions.settings');
$config
->set('intervals', $form_state
->getValue('intervals', []));
$config
->save();
}