function drupal_check_profile in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/includes/install.inc \drupal_check_profile()
Checks an installation profile's requirements.
Parameters
string $profile: Name of installation profile to check.
array $install_state: The current state in the install process.
Return value
array Array of the installation profile's requirements.
1 call to drupal_check_profile()
- install_check_requirements in core/
includes/ install.core.inc - Checks installation requirements and reports any errors.
File
- core/
includes/ install.inc, line 930 - API functions for installing modules and themes.
Code
function drupal_check_profile($profile, array $install_state) {
$info = install_profile_info($profile);
// Collect requirement testing results.
$requirements = array();
// Performs an ExtensionDiscovery scan as the system module is unavailable and
// we don't yet know where all the modules are located.
// @todo Remove as part of https://www.drupal.org/node/2186491
$listing = new ExtensionDiscovery(\Drupal::root());
$module_list = $listing
->scan('module');
foreach ($info['dependencies'] as $module) {
$file = \Drupal::root() . '/' . $module_list[$module]
->getPath() . "/{$module}.install";
if (is_file($file)) {
require_once $file;
}
$function = $module . '_requirements';
drupal_classloader_register($module, $module_list[$module]
->getPath());
if (function_exists($function)) {
$requirements = array_merge($requirements, $function('install'));
}
}
return $requirements;
}