public function EnvironmentAdminSettings::submitForm in Environment 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/ EnvironmentAdminSettings.php, line 26 - Contains \Drupal\environment\Form\EnvironmentAdminSettings.
Class
Namespace
Drupal\environment\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
environment_switch($form_state
->getValue('environments'));
$env_override = $form_state
->getValue('environment_require_override');
\Drupal::configFactory()
->getEditable('environment.settings')
->set('environment_require_override', $env_override)
->save();
}