You are here

function sendinblue_requirements in SendinBlue 8

Same name and namespace in other branches
  1. 8.2 sendinblue.install \sendinblue_requirements()
  2. 7.2 sendinblue.install \sendinblue_requirements()
  3. 7 sendinblue.install \sendinblue_requirements()

Implements hook_requirements().

File

./sendinblue.install, line 76
Install, update and uninstall functions for the sendinblue module.

Code

function sendinblue_requirements($phase) {
  $requirements = [];

  // Ensure translations don't break at install time:
  $has_curl = function_exists('curl_init');
  if (!$has_curl) {
    $requirements['sendinblue'] = [
      'title' => t('SendinBlue'),
      'description' => t('SendinBlue module could not be installed because the PHP <a href="@curl_url">cURL</a> library in not available', [
        '@curl_url' => 'http://php.net/manual/curl.setup.php',
      ]),
      'severity' => REQUIREMENT_ERROR,
    ];
  }
  return $requirements;
}