You are here

function sendinblue_requirements in SendinBlue 7

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

Implements hook_requirements().

File

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

Code

function sendinblue_requirements($phase) {
  $requirements = array();

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