mimemail_compress.install in Mime Mail 6
Same filename and directory in other branches
Install, update and uninstall functions for the Mime Mail Compress module.
File
modules/mimemail_compress/mimemail_compress.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the Mime Mail Compress module.
*/
/**
* Implements hook_requirements().
*/
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;
}
Functions
Name | Description |
---|---|
mimemail_compress_requirements | Implements hook_requirements(). |