You are here

function akamai_requirements in Akamai 8.3

Same name and namespace in other branches
  1. 8 akamai.install \akamai_requirements()
  2. 6 akamai.install \akamai_requirements()
  3. 7 akamai.install \akamai_requirements()

Implements hook_requirements().

File

./akamai.install, line 11
Contains install and update functionality for Akamai.

Code

function akamai_requirements($phase) {
  $requirements = [];
  if ($phase == 'install') {
    if (!class_exists('\\Akamai\\Open\\EdgeGrid\\Authentication')) {
      $requirements['akamai_auth_dependency'] = [
        'title' => t('Akamai'),
        'description' => t('Akamai requires the akamai-open/edgegrid-auth library.'),
        'severity' => REQUIREMENT_ERROR,
      ];
    }
    if (!class_exists('\\Akamai\\Open\\EdgeGrid\\Client')) {
      $requirements['akamai_client_dependency'] = [
        'title' => t('Akamai'),
        'description' => t('Akamai requires the akamai-open/edgegrid-client library.'),
        'severity' => REQUIREMENT_ERROR,
      ];
    }
  }
  return $requirements;
}