tmgmt_globaldoc-8.x-1.0/tmgmt_globaldoc.install
tmgmt_globaldoc.install
<?php
/**
* @file
* Install and update hooks for TMGMT GlobalDoc.
*/
/**
* Implements hook_requirements().
*/
function tmgmt_globaldoc_requirements($phase) {
$requirements = [];
$has_soapClient = class_exists('\SoapClient');
$has_zipArchive = class_exists('\ZipArchive');
if (!$has_soapClient) {
$requirements['globaldoc_soapclient'] = [
'title' => t('TMGMT GlobalDoc'),
'value' => t('SoapClient extension not found.'),
'severity' => REQUIREMENT_ERROR,
'description' => t('The module requires the <a href="http://php.net/manual/en/book.soap.php">PHP SOAP Extension</a>. For more information, see the <a href="http://php.net/manual/en/soap.installation.php">online information on installing the PHP SOAP extension</a>.')
];
}
if (!$has_zipArchive) {
$requirements['globaldoc_ziparchive'] = [
'title' => t('TMGMT GlobalDoc'),
'value' => t('ZipArchive extension not found.'),
'severity' => REQUIREMENT_ERROR,
'description' => t('The module requires the <a href="http://php.net/manual/en/zip.setup.php">PHP Zip Extension</a>. For more information, see the <a href="http://php.net/manual/en/zip.installation.php">online information on installing the PHP Zip extension</a>.')
];
}
return $requirements;
}
