On this page
function drupal_check_profile
drupal_check_profile($profile)
Checks an installation profile's requirements.
Parameters
$profile: Name of installation profile to check.
Return value
Array of the installation profile's requirements.
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;
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!install.inc/function/drupal_check_profile/7.x