function availability_calendar_field_formatter_view in Availability Calendars 7.4
Same name and namespace in other branches
- 7.5 availability_calendar.field.inc \availability_calendar_field_formatter_view()
- 7.3 availability_calendar.field.inc \availability_calendar_field_formatter_view()
Implements hook_field_formatter_view(). @link http://api.drupal.org/api/drupal/modules--field--field.api.php/function/...
File
- ./
availability_calendar.field.inc, line 550
Code
function availability_calendar_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
module_load_include('inc', 'availability_calendar', 'availability_calendar');
$element = array();
$settings = $display['settings'] + $instance['settings'] + $field['settings'];
foreach ($items as $delta => $item) {
if ($item['enabled'] == '1') {
$element[$delta] = array(
'#theme' => $display['type'],
'#settings' => $settings,
'#langcode' => $langcode,
'#cid' => $item['cid'],
'#cvid' => availability_calendar_get_cvid(),
'#name' => !empty($item['name']) ? $item['name'] : '',
);
}
}
return $element;
}