public function ZoneSelectionForm::submitForm in CloudFlare 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 FormInterface::submitForm
File
- src/
Form/ ZoneSelectionForm.php, line 218
Class
- ZoneSelectionForm
- Class ZoneSelectionForm.
Namespace
Drupal\cloudflare\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
if ($this->hasMultipleZones) {
$zone_id = $form_state
->getValue('zone_selection');
$this->config
->set('zone_id', $zone_id)
->save();
}
$form_state
->setRedirect('cloudflare.admin_settings_form');
}