You are here

function datex_requirements in Datex 7.3

Implements hook_requirements().

1 call to datex_requirements()
datex_enable in ./datex.module
Implements hook_enable().

File

./datex.install, line 72
Datex install file, for adding or removing datex variables.

Code

function datex_requirements() {
  _datex_fix_missing_datex_api_module();
  $requirements = [];
  $t = get_t();

  // we need DATEX_USE_INTL.
  require_once 'datex.module';
  $intl = [
    '@intl' => 'http://php.net/manual/en/intl.installation.php',
  ];
  $requirements['datex_intl'] = [
    'title' => $t('PHP Intl'),
    'severity' => DATEX_USE_INTL ? REQUIREMENT_OK : REQUIREMENT_WARNING,
    'value' => DATEX_USE_INTL ? $t('Available') : $t('Not available'),
    'description' => $t('<a href="@intl">php-intl</a> ' . 'is required for full support of non-gregorian calendars. Else, datex ' . 'functionality will be very limited', $intl),
  ];
  return $requirements;
}