function date_views_fields in Date 7
Same name and namespace in other branches
- 8 date_views/date_views.module \date_views_fields()
- 7.3 date_views/date_views.module \date_views_fields()
- 7.2 date_views/date_views.module \date_views_fields()
Identify all potential date/timestamp fields and cache the data.
6 calls to date_views_fields()
- date_views_argument_handler::admin_summary in date_views/
includes/ date_views_argument_handler.inc - Provide text for the administrative summary.
- date_views_argument_handler::get_query_fields in date_views/
includes/ date_views_argument_handler.inc - date_views_argument_handler::options_form in date_views/
includes/ date_views_argument_handler.inc - Add a form element to select date_fields for this argument.
- date_views_filter_handler::admin_summary in date_views/
includes/ date_views_filter_handler.inc - Display the filter on the administrative summary.
- date_views_filter_handler::extra_options_form in date_views/
includes/ date_views_filter_handler.inc - Provide a form for setting options.
File
- date_views/
includes/ date_views.views.inc, line 124 - Defines date-related Views data and plugins:
Code
function date_views_fields($base = 'node', $reset = FALSE) {
static $fields = array();
$empty = array(
'name' => array(),
'alias' => array(),
);
module_load_include('inc', 'date_views', 'includes/date_views_fields');
if (empty($fields[$base]) || $reset) {
$cid = 'date_views_fields_' . $base;
if (!$reset && ($cached = cache_get($cid, 'cache_views'))) {
$fields[$base] = $cached->data;
}
else {
$fields[$base] = _date_views_fields($base);
}
}
// Make sure that empty values will be arrays in he expected format.
return !empty($fields) && !empty($fields[$base]) ? $fields[$base] : $empty;
}