public ModulesUninstallConfirmForm::submitForm(array &$form, FormStateInterface $form_state)
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
- core/modules/system/src/Form/ModulesUninstallConfirmForm.php, line 154
Class
- ModulesUninstallConfirmForm
- Builds a confirmation form to uninstall selected modules.
Namespace
Drupal\system\Form
Code
1 2 3 4 5 6 7 8 9 10 11 | public function submitForm( array & $form , FormStateInterface $form_state ) { // Clear the key value store entry. $account = $this ->currentUser()->id(); $this ->keyValueExpirable-> delete ( $account ); // Uninstall the modules. $this ->moduleInstaller->uninstall( $this ->modules); drupal_set_message( $this ->t( 'The selected modules have been uninstalled.' )); $form_state ->setRedirectUrl( $this ->getCancelUrl()); } |
Please login to continue.