function field_timer_field_formatter_info in Field Timer 7
Same name and namespace in other branches
- 7.2 field_timer.module \field_timer_field_formatter_info()
Implements hook_field_formatter_info().
File
- ./
field_timer.module, line 135 - Main module file.
Code
function field_timer_field_formatter_info() {
$formatters = array(
'field_timer_text' => array(
'label' => t('Text'),
'description' => t('Simple text timer and countdown.'),
'field types' => array(
'field_timer',
),
'settings' => array(
'type' => 'auto',
'granularity' => 2,
),
),
);
$library = libraries_detect('county');
if ($library && !empty($library['installed'])) {
$formatters['field_timer_county'] = array(
'label' => t('County'),
'description' => t('Use County jQuery plugin to display countdown.'),
'field types' => array(
'field_timer',
),
'settings' => array(
'animation' => 'fade',
'speed' => 500,
'county_theme' => 'blue',
'background' => '',
'reflection' => 1,
'reflectionOpacity' => 0.2,
),
);
}
$library = libraries_detect('jquery.countdown');
if ($library && !empty($library['installed'])) {
$formatters['field_timer_jquery_countdown'] = array(
'label' => t('jQuery Countdown'),
'description' => t('Use jQuery Countdown plugin to display countdown and timer.'),
'field types' => array(
'field_timer',
),
'settings' => array(
'type' => 'auto',
'regional' => 'en',
'format' => 'dHMS',
'layout' => '',
'compact' => 0,
'significant' => 0,
'timeSeparator' => ':',
'padZeroes' => 0,
),
);
$formatters['field_timer_jquery_countdown_led'] = array(
'label' => 'jQuery Countdown LED',
'description' => t('Display timer and countdown as a LED.'),
'field types' => array(
'field_timer',
),
'settings' => array(
'type' => 'auto',
'countdown_theme' => 'green',
'max_count_of_days' => 2,
'display_days' => 1,
'display_hours' => 1,
'display_minutes' => 1,
'display_seconds' => 1,
),
);
}
return $formatters;
}