Skip to content
Snippets Groups Projects
Commit 391d29db authored by Vitalii Podoba's avatar Vitalii Podoba
Browse files

Issue #3425193 by hitchshock: Add check installation requirements and do status reporting

parent 6831ed70
Branches 1.0.x
No related tags found
1 merge request!5Resolve #3425193 "Add check installation"
Pipeline #349645 passed
<?php
/**
* @file
* PDF to Imagefield module installation file.
*/
/**
* Implements hook_requirements().
*/
function pdf_to_imagefield_requirements($phase): array {
$requirements = [];
if ($phase !== 'runtime') {
$loaded = !extension_loaded('imagick');
$requirements['ext_imagick'] = [
'title' => t('PHP extension imagick'),
'value' => $loaded ? t('Installed') : t('Missing extension'),
'severity' => $loaded ? REQUIREMENT_OK : REQUIREMENT_ERROR,
'description' => t('The PHP extension imagick is required to use this module.'),
];
}
return $requirements;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment