You are here

protected function field_timer_jquery_countdown_js_base::generateJSSettings in Field Timer 7.2

@inheritdoc

Overrides field_timer_formatter_js_base::generateJSSettings

2 calls to field_timer_jquery_countdown_js_base::generateJSSettings()
field_timer_jquery_countdown_date_field_base::generateJSSettings in includes/field_timer_jquery_countdown.inc
@inheritdoc
field_timer_jquery_countdown_led_date_field_base::generateJSSettings in includes/field_timer_jquery_countdown_led.inc
@inheritdoc
2 methods override field_timer_jquery_countdown_js_base::generateJSSettings()
field_timer_jquery_countdown_date_field_base::generateJSSettings in includes/field_timer_jquery_countdown.inc
@inheritdoc
field_timer_jquery_countdown_led_date_field_base::generateJSSettings in includes/field_timer_jquery_countdown_led.inc
@inheritdoc

File

includes/field_timer_base.inc, line 182
Contains base help classes to perform field formatter related actions.

Class

field_timer_jquery_countdown_js_base
Base class for jquery_countdown formatters.

Code

protected function generateJSSettings($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $info = entity_get_info($entity_type);
  $id_key = $info['entity keys']['id'];
  $js_settings = array();
  $settings = $display['settings'];
  foreach ($items as $delta => $item) {
    $key = $entity_type . '_' . $entity->{$id_key} . '_' . $field['field_name'] . '_' . $delta;
    $timestamp = $this
      ->getTimestamp($item, $field);
    $js_settings += $this
      ->generateJSSettingsArray($key, $timestamp, $settings['type'], $settings);
  }
  return $js_settings;
}