public ModulesListConfirmForm::buildForm(array $form, FormStateInterface $form_state)
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides ConfirmFormBase::buildForm
File
- core/modules/system/src/Form/ModulesListConfirmForm.php, line 113
Class
- ModulesListConfirmForm
- Builds a confirmation form for enabling modules with dependencies.
Namespace
Drupal\system\Form
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | public function buildForm( array $form , FormStateInterface $form_state ) { $account = $this ->currentUser()->id(); $this ->modules = $this ->keyValueExpirable->get( $account ); // Redirect to the modules list page if the key value store is empty. if (! $this ->modules) { return $this ->redirect( 'system.modules_list' ); } $items = $this ->buildMessageList(); $form [ 'message' ] = array ( '#theme' => 'item_list' , '#items' => $items , ); return parent::buildForm( $form , $form_state ); } |
Please login to continue.