public function ViewsJsonSourceSettingsForm::submitForm in Views Json Source 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/ ViewsJsonSourceSettingsForm.php, line 51
Class
- ViewsJsonSourceSettingsForm
- Form for configure values.
Namespace
Drupal\views_json_source\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$this
->config('views_json_source.settings')
->set('cache_ttl', $form_state
->getValue('cache_ttl'))
->save();
}