function DevelReinstall::validateForm
Same name in other branches
- 4.x src/Form/DevelReinstall.php \Drupal\devel\Form\DevelReinstall::validateForm()
Overrides FormBase::validateForm
File
-
src/
Form/ DevelReinstall.php, line 135
Class
- DevelReinstall
- Display a dropdown of installed modules with the option to reinstall them.
Namespace
Drupal\devel\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) : void {
// Form submitted, but no modules selected.
if (array_filter($form_state->getValue('reinstall')) === []) {
$form_state->setErrorByName('reinstall', $this->t('No modules selected.'));
}
}