function smart_ip_maxmind_geoip2_bin_db_requirements in Smart IP 8.3
Same name and namespace in other branches
- 8.4 modules/smart_ip_maxmind_geoip2_bin_db/smart_ip_maxmind_geoip2_bin_db.install \smart_ip_maxmind_geoip2_bin_db_requirements()
Implements hook_requirements().
File
- modules/
smart_ip_maxmind_geoip2_bin_db/ smart_ip_maxmind_geoip2_bin_db.install, line 9
Code
function smart_ip_maxmind_geoip2_bin_db_requirements($phase) {
$requirements = [];
if ($phase == 'install') {
if (!class_exists('\\GeoIp2\\Database\\Reader')) {
$requirements['geoip2_library'] = [
'description' => t('Smart IP MaxMind GeoIP2 binary database module requires the
geoip2/geoip2 library. To setup, follow this @guide', [
'@guide' => Link::fromTextAndUrl(t('guide'), Url::fromUri('https://www.webfoobar.com/node/71'))
->toString(),
]),
'severity' => REQUIREMENT_ERROR,
];
}
}
return $requirements;
}