You are here

function real_aes_requirements in Real AES 8

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

Implements hook_requirements().

File

./real_aes.install, line 10
Holds installation hooks for Real AES.

Code

function real_aes_requirements($phase) {
  $requirements = array();
  $requirements['real_aes_library'] = array(
    'title' => t('Defuse PHP-Encryption library'),
  );
  if (class_exists('\\Defuse\\Crypto\\Crypto')) {
    $requirements['real_aes_library']['value'] = t('Installed');
    $requirements['real_aes_library']['severity'] = REQUIREMENT_OK;
  }
  else {
    $requirements['real_aes_library']['value'] = t('Not Installed');
    $requirements['real_aes_library']['severity'] = REQUIREMENT_ERROR;
    $requirements['real_aes_library']['description'] = t('Please install the Defuse PHP-encryption library via Composer. See README.txt');
  }
  return $requirements;
}