You are here

function date_ical_get_summary_fields in Date iCal 7.3

Same name and namespace in other branches
  1. 7.2 date_ical.module \date_ical_get_summary_fields()

Identify all potential fields which could be used as an iCal SUMMARY.

2 calls to date_ical_get_summary_fields()
date_ical_plugin_row_ical_entity::options_form in includes/date_ical_plugin_row_ical_entity.inc
Build the form for setting the row plugin's options.
date_ical_plugin_row_ical_entity::render in includes/date_ical_plugin_row_ical_entity.inc
Renders the entities returned by the view into event arrays.

File

./date_ical.module, line 377
Adds ical functionality to Views, and an iCal parser to Feeds.

Code

function date_ical_get_summary_fields($base = 'node', $reset = FALSE) {
  static $fields = array();
  $empty = array(
    'name' => array(),
    'alias' => array(),
  );
  if (empty($fields[$base]) || $reset) {
    $cid = 'date_ical_summary_fields_' . $base;
    if (!$reset && ($cached = cache_get($cid, 'cache_views'))) {
      $fields[$base] = $cached->data;
    }
    else {
      $fields[$base] = _date_ical_get_summary_fields($base);
    }
  }

  // Make sure that empty values will be arrays in the expected format.
  return !empty($fields) && !empty($fields[$base]) ? $fields[$base] : $empty;
}