You are here

function datex_api_requirements in Datex 7

Same name and namespace in other branches
  1. 7.2 datex_api/datex_api.install \datex_api_requirements()

Implements hook_requirements().

datex works much better with php-intl installed

File

datex_api/datex_api.install, line 13
Datex API installation hooks. Checks to see if PHP-Intl is available or not

Code

function datex_api_requirements($phase) {
  $requirements = array();
  $t = get_t();
  $requirements['datex_intl'] = array(
    'title' => $t('PHP Intl Availability'),
    'value' => $t('%datex_api works much better and more smoothly, if php-intl is available.', array(
      'datex_api' => 'Datex API',
    )),
    'description' => $t('php-intl is new PHP Internationalazation class, Supporting all the calendars available, using php-intl, datex internal methods will not be needed any more since php-intl is faster and better.'),
    'severity' => REQUIREMENT_INFO,
  );
  if (class_exists('IntlDateFormatter')) {
    $requirements['datex_intl']['severity'] = REQUIREMENT_OK;
  }
  return $requirements;
}