public function PurgeConfigurationsForm::submitForm in Easy Install 8.9
Same name and namespace in other branches
- 8.10 src/Form/PurgeConfigurationsForm.php \Drupal\easy_install\Form\PurgeConfigurationsForm::submitForm()
- 8.5 src/Form/PurgeConfigurationsForm.php \Drupal\easy_install\Form\PurgeConfigurationsForm::submitForm()
- 8.6 src/Form/PurgeConfigurationsForm.php \Drupal\easy_install\Form\PurgeConfigurationsForm::submitForm()
- 8.7 src/Form/PurgeConfigurationsForm.php \Drupal\easy_install\Form\PurgeConfigurationsForm::submitForm()
- 8.8 src/Form/PurgeConfigurationsForm.php \Drupal\easy_install\Form\PurgeConfigurationsForm::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 FormInterface::submitForm
File
- src/
Form/ PurgeConfigurationsForm.php, line 440
Class
- PurgeConfigurationsForm
- Provides module installation interface.
Namespace
Drupal\easy_install\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
// Retrieve a list of modules to install and their dependencies.
$modules = $this
->buildModuleList($form_state);
// Redirect to a confirmation form if needed.
$route_name = 'easy_install.purge_configurations_confirm';
// Write the list of changed module states into a key value store.
$account = $this
->currentUser()
->id();
$this->keyValueExpirable
->setWithExpire($account, $modules, 60);
// Redirect to the confirmation form.
$form_state
->setRedirect($route_name);
}