You are here

function calendar_fields in Calendar 5.2

Same name and namespace in other branches
  1. 5 calendar.module \calendar_fields()

Identify all potential date/timestamp fields

9 calls to calendar_fields()
calendar_build_field_query in ./calendar.inc
Build a filtering query for an individual date field
calendar_build_nodes in ./calendar.inc
Take the array of items and alter it to an array of calendar nodes that the theme can handle.
calendar_clear_all in ./calendar.module
Empty or reset cached values.
calendar_views_pre_view in ./calendar.module
Implementation of hook_views_pre_view()
theme_calendar_ical_field in ./calendar_ical.module
Views field theme for an ical field.

... See full list

6 string references to 'calendar_fields'
calendar_clear_all in ./calendar.module
Empty or reset cached values.
calendar_disable in ./calendar.install
Implementation of hook_disable(). Empty the calendar caches.
calendar_enable in ./calendar.install
Implementation of hook_enable(). Reset the calendar caches.
calendar_uninstall in ./calendar.install
Implementation of hook_uninstall().
calendar_update_5000 in ./calendar.install
Move these caches from 'cache' to 'cache_views' so they get cleared automatically whenever views_invalidate_cache() is called.

... See full list

File

./calendar.module, line 840
Adds calendar filtering and displays to Views.

Code

function calendar_fields($reset = FALSE) {
  static $fields;
  if (empty($fields) || $reset) {
    $cid = 'calendar_fields';
    if (!$reset && ($cached = cache_get($cid, 'cache_views'))) {
      $fields = unserialize($cached->data);
    }
    else {
      require_once './' . drupal_get_path('module', 'calendar') . '/calendar_admin.inc';
      $fields = _calendar_fields();
    }
  }
  return $fields;
}