function yr_verdata_requirements in Yr Weatherdata 6.2
Same name and namespace in other branches
- 6 yr_verdata.install \yr_verdata_requirements()
- 7.3 yr_verdata.install \yr_verdata_requirements()
- 7 yr_verdata.install \yr_verdata_requirements()
Implementation of hook_requirements()
File
- ./
yr_verdata.install, line 11 - Install, update and uninstall functions for the yr_verdata module.
Code
function yr_verdata_requirements($phase) {
$requirements = array();
$t = get_t();
switch ($phase) {
case 'install':
if (!function_exists('curl_init')) {
$req = 'cURL';
$requirements['curl'] = array(
'title' => $req,
'description' => $t('@req is required for yr_verdata to function properly. This is normally built-in with PHP 5. Contact your server administrator.', array(
'@req' => $req,
)),
'severity' => REQUIREMENT_ERROR,
);
}
if (!function_exists('simplexml_load_file')) {
$req = 'SimpleXML';
$requirements['simplexml'] = array(
'title' => $req,
'description' => $t('@req is required for yr_verdata to function properly. This is normally built-in with PHP 5. Contact your server administrator.', array(
'@req' => $req,
)),
'severity' => REQUIREMENT_ERROR,
);
}
break;
}
return $requirements;
}