public function AllowIframedSiteConfigForm::submitForm in Allow site iframing 8
Same name and namespace in other branches
- 3.0.x src/Form/AllowIframedSiteConfigForm.php \Drupal\allow_iframed_site\Form\AllowIframedSiteConfigForm::submitForm()
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/ AllowIframedSiteConfigForm.php, line 71
Class
Namespace
Drupal\allow_iframed_site\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('allow_iframed_site.settings');
foreach ($this->conditions as $key => $condition) {
$condition
->submitConfigurationForm($form, $form_state);
$config
->set($key, $condition
->getConfiguration());
}
$config
->save();
parent::submitForm($form, $form_state);
// @TODO there should be a better way to invalidate the page cache.
// but chances are this config will change rarely and be used on smaller sites.
drupal_flush_all_caches();
}