You are here

function sparkpost_requirements in Sparkpost email 7

Same name and namespace in other branches
  1. 7.2 sparkpost.install \sparkpost_requirements()

Implements hook_requirements().

File

./sparkpost.install, line 11
Install, update and uninstall functions for the sparkpost module.

Code

function sparkpost_requirements($phase) {
  $t = get_t();
  $requirements = array();
  if (!module_exists('composer_manager') && !class_exists('\\SparkPost\\SparkPost')) {
    $requirements['sparkpost'] = array(
      'title' => $t('Sparkpost'),
      'value' => t('Make sure the Sparkpost package is installed via Composer. This can be done using the <a href="!url">composer_manager</a> module.', array(
        '!url' => 'https://drupal.org/project/composer_manager',
      )),
      'severity' => REQUIREMENT_ERROR,
    );
  }
  return $requirements;
}