emogrifier.install in Emogrifier 8
Same filename and directory in other branches
Provide Emogrifier requirements for the status page.
File
emogrifier.installView source
<?php
/**
* @file
* Provide Emogrifier requirements for the status page.
*/
/**
* Implements hook_requirements().
*/
function emogrifier_requirements($phase) {
$t = get_t();
$dom = extension_loaded('dom');
$emogrifier = drupal_load('module', 'libraries') && drupal_load('module', 'emogrifier') && _emogrifier_available();
$args = array(
'!help' => '/admin/help/emogrifier',
'!emogrifier' => 'http://drupal.org/project/emogrifier',
'%emogrifier' => 'Emogrifier',
'!dom' => 'http://php.net/dom',
'%dom' => 'DOM',
);
return array(
'emogrifier_dom' => array(
'title' => $t('<a href="!dom">%dom</a> extension', $args),
'value' => $dom ? 'Enabled' : 'Disabled',
'description' => $t('The <a href="!emogrifier">%emogrifier</a> module requires the PHP <a href="!dom">%dom</a> extension.', $args),
'severity' => $dom ? REQUIREMENT_OK : REQUIREMENT_WARNING,
),
'emogrifier_class' => array(
'title' => $t('<a href="!help">%emogrifier</a> class library', $args),
'value' => $emogrifier ? 'Available' : 'Unavailable',
'description' => $emogrifier ? $t('The <a href="!help">%emogrifier</a> class library was found.', $args) : $t('The <a href="!help">%emogrifier</a> class library was not found.', $args),
'severity' => $emogrifier ? REQUIREMENT_OK : REQUIREMENT_WARNING,
),
);
}
Functions
Name | Description |
---|---|
emogrifier_requirements | Implements hook_requirements(). |