You are here

function jstimer_field_formatter_info in Javascript Timer 7

Implements hook_field_formatter_info().

File

./jstimer.field.inc, line 10
Field hooks to implement a jstimer field.

Code

function jstimer_field_formatter_info() {
  $widgets = jstimer_get_widgets();
  $formatters = array();
  foreach ($widgets as $widget) {
    $key = $widget->name;
    $formatters[$key] = array(
      'label' => $widget->label,
      'field types' => array(
        'date',
        'datestamp',
        'datetime',
      ),
    );
    if (isset($widget->settings)) {
      $formatters[$key]['settings'] = $widget->settings;
    }
  }
  return $formatters;
}