public function field_timer_jquery_countdown_base::renderItems in Field Timer 7.2
@inheritdoc
Overrides field_timer_formatter_interface::renderItems
1 call to field_timer_jquery_countdown_base::renderItems()
- field_timer_jquery_countdown_date_field_base::renderItems in includes/
field_timer_jquery_countdown.inc - @inheritdoc
1 method overrides field_timer_jquery_countdown_base::renderItems()
- field_timer_jquery_countdown_date_field_base::renderItems in includes/
field_timer_jquery_countdown.inc - @inheritdoc
File
- includes/
field_timer_jquery_countdown.inc, line 131 - Help file. Contains help classes to perform field_timer_jquery_countdown formatter related actions.
Class
- field_timer_jquery_countdown_base
- Base class for field_timer_jquery_countdown formatter.
Code
public function renderItems($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
if (!$this
->loadLibrary()) {
return array();
}
$info = entity_get_info($entity_type);
$id_key = $info['entity keys']['id'];
$elements = array();
foreach ($items as $delta => $item) {
$elements[$delta] = array(
'#type' => 'markup',
'#markup' => '<span id="jquery-countdown-' . $entity_type . '_' . $entity->{$id_key} . '_' . $field['field_name'] . '_' . $delta . '" class="jquery-countdown"></span>',
);
}
$this
->loadJSandCSS($entity_type, $entity, $field, $instance, $langcode, $items, $display);
return $elements;
}