You are here

function calendar_plugin_style::date_fields in Calendar 7

Same name and namespace in other branches
  1. 6.2 includes/calendar_plugin_style.inc \calendar_plugin_style::date_fields()
  2. 7.2 includes/calendar_plugin_style.inc \calendar_plugin_style::date_fields()

Calendar argument date fields used in this view.

1 call to calendar_plugin_style::date_fields()
calendar_view_plugin_style::options_form in includes/calendar_view_plugin_style.inc
Style options.

File

includes/calendar_plugin_style.inc, line 51
Views navigation style plugin for the Calendar module.

Class

calendar_plugin_style
Style plugin to create the calendar navigation and links.

Code

function date_fields() {
  $date_fields = array();
  $calendar_fields = date_views_fields();
  $arguments = $this->display->handler
    ->get_option('arguments');
  foreach ($arguments as $name => $argument) {
    if (isset($argument['date_fields'])) {
      foreach ($argument['date_fields'] as $date_field) {
        $field = $calendar_fields['name'][$date_field];
        $handler = views_get_handler($field['table_name'], $field['field_name'], 'field');
        if ($handler) {
          $date_fields[$date_field] = $field;
          $date_fields[$date_field]['name'] = $handler
            ->ui_name();
        }
      }
    }
  }
  return $date_fields;
}