You are here

function phone_requirements in Phone 7.2

Implements hook_requirements().

1 call to phone_requirements()
phone_enable in ./phone.install
Implements hook_enable().

File

./phone.install, line 11
Install/Update/Uninstall functions for phone module

Code

function phone_requirements($phase) {
  $requirements = array();
  $t = get_t();
  if ($phase == 'runtime' && !phone_libphonenumber(TRUE, TRUE)) {
    $library_info = phone_libraries_info();
    $requirements['phone'] = array(
      'title' => $t('Lib Phone Number'),
      'value' => $t('Not Installed'),
      'severity' => REQUIREMENT_ERROR,
      'description' => $t('The Phone module requires libphonenumber to perform country level validation and formatting of phone numbers. Download <a href="!url">here</a> and install into sites/all/libraries/libphonenumber-for-php.', array(
        '!url' => $library_info['libphonenumber-for-php']['download url'],
      )),
    );
  }
  return $requirements;
}