public function SettingsForm::submitForm in Imagecache External 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/ SettingsForm.php, line 173
Class
- SettingsForm
- Defines a form that configures uploadcare settings.
Namespace
Drupal\imagecache_external\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$values = $form_state
->getValues();
$this
->config('imagecache_external.settings')
->set('imagecache_directory', $values['imagecache_directory'])
->set('imagecache_default_extension', $values['imagecache_default_extension'])
->set('imagecache_external_management', $values['imagecache_external_management'])
->set('imagecache_external_use_whitelist', $values['imagecache_external_use_whitelist'])
->set('imagecache_external_hosts', $values['imagecache_external_hosts'])
->set('imagecache_fallback_image', $values['imagecache_fallback_image'])
->set('imagecache_external_cron_flush_frequency', $values['imagecache_external_cron_flush_frequency'])
->save();
parent::submitForm($form, $form_state);
}