function print_mail_requirements in Printer, email and PDF versions 7
Same name and namespace in other branches
- 5.4 print_mail/print_mail.module \print_mail_requirements()
- 7.2 print_mail/print_mail.install \print_mail_requirements()
Implements hook_requirements().
File
- print_mail/
print_mail.module, line 113 - Displays Printer-friendly versions of Drupal pages.
Code
function print_mail_requirements($phase) {
$requirements = array();
$t = get_t();
switch ($phase) {
// At runtime, make sure that a PDF generation tool is selected
case 'runtime':
if (module_exists('mailsystem')) {
$mail_system = mailsystem_get();
if ($mail_system['default-system'] != 'DefaultMailSystem' && (!isset($mail_system['print_mail']) || $mail_system['print_mail'] != 'DefaultMailSystem')) {
$requirements['print_mail_mailsystem'] = array(
'title' => $t('Printer, email and PDF versions - Send by email'),
'value' => $t('Incompatible Mail System setting detected'),
'description' => $t('The send by email module requires the use of the DefaultMailSystem, please configure it in the !url.', array(
'!url' => l($t('Mail System Settings page'), 'admin/config/system/mailsystem'),
)),
'severity' => REQUIREMENT_WARNING,
);
}
}
}
return $requirements;
}