function drupal_check_profile in Drupal 7
Same name and namespace in other branches
- 8 core/includes/install.inc \drupal_check_profile()
- 5 includes/install.inc \drupal_check_profile()
- 6 includes/install.inc \drupal_check_profile()
- 9 core/includes/install.inc \drupal_check_profile()
- 10 core/includes/install.inc \drupal_check_profile()
Checks an installation profile's requirements.
Parameters
$profile: Name of installation profile to check.
Return value
Array of the installation profile's requirements.
1 call to drupal_check_profile()
- install_check_requirements in includes/
install.core.inc - Checks installation requirements and reports any errors.
File
- includes/
install.inc, line 1172 - API functions for installing modules and themes.
Code
function drupal_check_profile($profile) {
include_once DRUPAL_ROOT . '/includes/file.inc';
$profile_file = DRUPAL_ROOT . "/profiles/{$profile}/{$profile}.profile";
if (!isset($profile) || !file_exists($profile_file)) {
throw new Exception(install_no_profile_error());
}
$info = install_profile_info($profile);
// Collect requirement testing results.
$requirements = array();
foreach ($info['dependencies'] as $module) {
module_load_install($module);
$function = $module . '_requirements';
if (function_exists($function)) {
$requirements = array_merge($requirements, $function('install'));
}
}
return $requirements;
}