function uc_fedex_requirements in FedEx Shipping 6
Same name and namespace in other branches
- 6.2 uc_fedex.install \uc_fedex_requirements()
- 7.2 uc_fedex.install \uc_fedex_requirements()
- 7 uc_fedex.install \uc_fedex_requirements()
Implementation of hook_requirements().
File
- ./
uc_fedex.install, line 15 - Database installation, uninstallation, and update functions for the FedEx Shipping Quotes module
Code
function uc_fedex_requirements($phase) {
$t = get_t();
// Check that the PHP SOAP extension is loaded
$has_soap = extension_loaded('soap');
$requirements['uc_fedex_soap'] = array(
'title' => $t('SOAP'),
'value' => $has_soap ? $t('Installed') : $t('Not Installed'),
);
if (!$has_soap) {
$requirements['uc_fedex_soap']['severity'] = REQUIREMENT_ERROR;
$requirements['uc_fedex_soap']['description'] = $t("The FedEx API requires the PHP <a href='!soap_url'>SOAP</a> library.", array(
'!soap_url' => 'http://www.php.net/soap',
));
}
return $requirements;
}