You are here

function formatted_number_theme in Formatted Number 6

Implementation of hook_theme().

File

./formatted_number.module, line 79
Defines CCK numeric types where thousands separator and decimal point are inherited from the Format Number API module.

Code

function formatted_number_theme() {
  $theme_hooks = array(
    'formatted_number' => array(
      'arguments' => array(
        'element' => NULL,
      ),
    ),
    'formatted_number_formatter_default' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'function' => 'theme_formatted_number_formatter_generic',
    ),
    'formatted_number_formatter_nozeros' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'function' => 'theme_formatted_number_formatter_generic',
    ),
    'formatted_number_formatter_unformatted' => array(
      'arguments' => array(
        'element' => NULL,
      ),
    ),
  );

  // Formatters for fixed number of decimal places.
  foreach (formatted_number_decimal_place_formatter_lengths() as $decimal_places) {
    $theme_hooks['formatted_number_formatter_dp_' . $decimal_places] = array(
      'arguments' => array(
        'element' => NULL,
      ),
      'function' => 'theme_formatted_number_formatter_rounded',
    );
  }

  // Formatters for fixed number of significant figures.
  if (function_exists('format_number_significant_figures')) {
    foreach (formatted_number_significant_figure_formatter_lengths() as $significant_figures) {
      $theme_hooks['formatted_number_formatter_sf_' . $significant_figures] = array(
        'arguments' => array(
          'element' => NULL,
        ),
        'function' => 'theme_formatted_number_formatter_rounded',
      );
    }
  }
  return $theme_hooks;
}