function mimemail_compress_requirements in Mime Mail 6
Same name and namespace in other branches
- 7 modules/mimemail_compress/mimemail_compress.install \mimemail_compress_requirements()
Implements hook_requirements().
File
- modules/
mimemail_compress/ mimemail_compress.install, line 11 - Install, update and uninstall functions for the Mime Mail Compress module.
Code
function mimemail_compress_requirements($phase) {
$requirements = array();
// Ensure translations don't break at install time.
$t = get_t();
// Test PHP DOM Extension.
$requirements['dom'] = array(
'title' => $t('PHP DOM Extension'),
);
if (!extension_loaded('dom')) {
$requirements['dom']['description'] = $t('Mime Mail Compress requires the PHP DOM extension to be enabled.');
$requirements['dom']['severity'] = REQUIREMENT_ERROR;
if ($phase == 'runtime') {
$requirements['dom']['value'] = $t('Disabled');
}
}
elseif ($phase == 'runtime') {
$requirements['dom']['value'] = $t('Enabled');
}
return $requirements;
}