You are here

function globallink_requirements in GlobalLink Connect for Drupal 8.2

Same name and namespace in other branches
  1. 8 globallink.install \globallink_requirements()

Implements hook_requirements().

File

./globallink.install, line 10
Install, update and uninstall functions for the globallink module.

Code

function globallink_requirements($phase) {
  $requirements = [];
  if (in_array($phase, [
    'runtime',
    'install',
  ])) {

    // Check for the soap client.
    if (!extension_loaded('soap')) {
      $requirements['globallink'] = [
        'title' => t('Soap client not installed'),
        'value' => t('Not installed'),
        'severity' => REQUIREMENT_ERROR,
        'description' => t('The Soap client for PHP is missing or outdated. Check the <a href="http://php.net/manual/en/book.soap.php">PHP soap documentation</a> for information on how to correct this.'),
      ];
    }
  }
  return $requirements;
}