function ModuleInstallerInterface::getModulesToInstall

Determines the full set of modules corresponding to the given list.

Parameters

string[] $module_list: An array of module machine names.

bool $enable_dependencies: (optional) If TRUE, dependencies are resolved and added to the returned list in the correct install order. If FALSE, only the given modules that are not yet installed are returned.

Return value

string[] The machine names of the modules that are not yet installed, including resolved dependencies, ordered the way ::install() would install them. Already installed modules are omitted.

Throws

\Drupal\Core\Extension\MissingDependencyException Thrown when a requested module, or a dependency of one, can not be found or is incompatible with this version of Drupal core.

\Drupal\Core\Extension\Exception\ObsoleteExtensionException Thrown when a requested module is obsolete.

File

core/lib/Drupal/Core/Extension/ModuleInstallerInterface.php, line 75

Class

ModuleInstallerInterface
Provides the installation of modules with creating the db schema and more.

Namespace

Drupal\Core\Extension

Code

public function getModulesToInstall(array $module_list, bool $enable_dependencies = TRUE) : array;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.