You are here

datex_api.install in Datex 7

Same filename and directory in other branches
  1. 7.2 datex_api/datex_api.install

Datex API installation hooks. Checks to see if PHP-Intl is available or not

File

datex_api/datex_api.install
View source
<?php

/**
 * @file
 * Datex API installation hooks. Checks to see if PHP-Intl is available or not
 */

/**
 * Implements hook_requirements().
 *
 * datex works much better with php-intl installed
 */
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;
}

Functions

Namesort descending Description
datex_api_requirements Implements hook_requirements().