hijri.install in Hijri 1.0.x
Same filename and directory in other branches
Installation file.
File
hijri.installView source
<?php
/**
* @file
* Installation file.
*/
/**
* Implements hook_requirements().
*/
function hijri_requirements($phase) {
$requirements = [];
if ($phase == "runtime") {
$requirements['hijri'] = [
'title' => t('arutil/ar-php library'),
];
if (class_exists('ArUtil\\I18N\\Date')) {
$requirements['hijri']['value'] = t('Installed');
$requirements['hijri']['severity'] = REQUIREMENT_OK;
}
else {
$requirements['hijri']['value'] = t('Not installed');
$requirements['hijri']['severity'] = REQUIREMENT_ERROR;
$requirements['hijri']['description'] = t('Please install <a href="@arutil">arutil/ar-php</a> library.', [
'@arutil' => 'https://packagist.org/packages/arutil/ar-php',
]);
}
}
return $requirements;
}
Functions
Name | Description |
---|---|
hijri_requirements | Implements hook_requirements(). |