protected function field_timer_county_base::generateJSSettings in Field Timer 7.2
@inheritdoc
Overrides field_timer_formatter_js_base::generateJSSettings
1 call to field_timer_county_base::generateJSSettings()
- field_timer_county_date_field_base::generateJSSettings in includes/
field_timer_county.inc - @inheritdoc
1 method overrides field_timer_county_base::generateJSSettings()
- field_timer_county_date_field_base::generateJSSettings in includes/
field_timer_county.inc - @inheritdoc
File
- includes/
field_timer_county.inc, line 192 - Help file. Contains help classes to perform field_timer_county formatter related actions.
Class
- field_timer_county_base
- Base class for field_timer_county formatter.
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;
$js_settings[$key]['timestamp'] = $this
->getTimestamp($item, $field);
$js_settings[$key]['options'] = $settings;
$js_settings[$key]['plugin'] = $this
->getPluginName();
}
return $js_settings;
}