function ModulesListConfirmForm::buildMessageList
Same name in other branches
- 9 core/modules/system/src/Form/ModulesListConfirmForm.php \Drupal\system\Form\ModulesListConfirmForm::buildMessageList()
- 10 core/modules/system/src/Form/ModulesListConfirmForm.php \Drupal\system\Form\ModulesListConfirmForm::buildMessageList()
- 11.x core/modules/system/src/Form/ModulesListConfirmForm.php \Drupal\system\Form\ModulesListConfirmForm::buildMessageList()
Builds the message list for the confirmation form.
Return value
\Drupal\Component\Render\MarkupInterface[] Array of markup for the list of messages on the form.
See also
\Drupal\system\Form\ModulesListForm::buildModuleList()
2 calls to ModulesListConfirmForm::buildMessageList()
- ModulesListConfirmForm::buildForm in core/
modules/ system/ src/ Form/ ModulesListConfirmForm.php - Form constructor.
- ModulesListExperimentalConfirmForm::buildMessageList in core/
modules/ system/ src/ Form/ ModulesListExperimentalConfirmForm.php - Builds the message list for the confirmation form.
1 method overrides ModulesListConfirmForm::buildMessageList()
- ModulesListExperimentalConfirmForm::buildMessageList in core/
modules/ system/ src/ Form/ ModulesListExperimentalConfirmForm.php - Builds the message list for the confirmation form.
File
-
core/
modules/ system/ src/ Form/ ModulesListConfirmForm.php, line 141
Class
- ModulesListConfirmForm
- Builds a confirmation form for enabling modules with dependencies.
Namespace
Drupal\system\FormCode
protected function buildMessageList() {
$items = [];
if (!empty($this->modules['dependencies'])) {
// Display a list of required modules that have to be installed as well
// but were not manually selected.
foreach ($this->modules['dependencies'] as $module => $dependencies) {
$items[] = $this->formatPlural(count($dependencies), 'You must enable the @required module to install @module.', 'You must enable the @required modules to install @module.', [
'@module' => $this->modules['install'][$module],
// It is safe to implode this because module names are not translated
// markup and so will not be double-escaped.
'@required' => implode(', ', $dependencies),
]);
}
}
return $items;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.