You are here

function formatted_number_requirements in Formatted Number 6

Implementation of hook_requirements().

Requirement: function format_number_get_options() was added in version 6.x-1.1 of the format_number module.

File

./formatted_number.install, line 14
Module installation/uninstallation hooks.

Code

function formatted_number_requirements($phase) {
  if ($phase == 'install') {
    $requirements = array();

    // Ensure translations don't break at install time
    $t = get_t();
    drupal_load('module', 'format_number');
    if (!function_exists('format_number_get_options')) {
      $requirements['format_number'] = array(
        'title' => $t('Format Number API'),
        'description' => $t('%module-name requires, at least, version 6.x-1.1 of the <a href="@format-number">Format Number API</a> module.', array(
          '%module-name' => $t('Formatter Number CCK'),
          '@format-number' => 'http://drupal.org/project/format_number',
        )),
        'value' => $t('version 6.x-1.0'),
        'severity' => REQUIREMENT_ERROR,
      );
    }
    return $requirements;
  }
}