You are here

function _fullcalendar_parse_fields in FullCalendar 6.2

Helper function to resolve field_name and field_label.

Parameters

$display: Object representing the View display.

Return value

Array of date field labels, keyed by field_name.

1 call to _fullcalendar_parse_fields()
fullcalendar_plugin_row_fields::options_form in includes/views/plugins/fullcalendar_plugin_row_fields.inc

File

./fullcalendar.module, line 341
Provides a views style plugin for FullCalendar

Code

function _fullcalendar_parse_fields($display) {
  $field_options = array();
  foreach ($display
    ->get_handlers('field') as $id => $field) {
    if (isset($field->definition['field_name'])) {
      $field_options[$id] = $field->definition['field_name'];
    }
    else {
      $field_options[$id] = $field->definition['title'];
    }
  }
  return array_intersect_key($display
    ->get_field_labels(), fullcalendar_date_fields($field_options));
}