function ModulesListForm::classifyByStability
Same name and namespace in other branches
- 11.x core/modules/system/src/Form/ModulesListForm.php \Drupal\system\Form\ModulesListForm::classifyByStability()
Classifies modules into stable and non-stable.
Parameters
array $ordered: The list of ordered module names.
array $modules: The modules data structure.
array $data: The module extension list data.
Return value
array The existing modules array containing 'install' and 'non_stable' keys.
1 call to ModulesListForm::classifyByStability()
- ModulesListForm::buildModuleList in core/
modules/ system/ src/ Form/ ModulesListForm.php - Helper function for building a list of modules to install.
File
-
core/
modules/ system/ src/ Form/ ModulesListForm.php, line 530
Class
- ModulesListForm
- Provides module installation interface.
Namespace
Drupal\system\FormCode
protected function classifyByStability(array $ordered, array $modules, array $data) : array {
foreach ($ordered as $name) {
$info = $data[$name]->info;
$modules['install'][$name] = $info['name'];
// Identify non-stable modules.
if ($info[ExtensionLifecycle::LIFECYCLE_IDENTIFIER] !== ExtensionLifecycle::STABLE) {
$modules['non_stable'][$name] = $info['name'];
}
}
return $modules;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.