You are here

function fullcalendar_date_fields in FullCalendar 6

Same name and namespace in other branches
  1. 6.2 fullcalendar.module \fullcalendar_date_fields()
  2. 7 fullcalendar.module \fullcalendar_date_fields()

Finds all the date fields for a given node.

Parameters

$node: The node that will be updated.

Return value

Array of date fields for the given node.

1 call to fullcalendar_date_fields()
template_preprocess_views_view_node_fullcalendar in ./fullcalendar.module
Prepares variables for template file invoked for node row type.

File

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

Code

function fullcalendar_date_fields($node) {
  $type = content_types($node->type);
  $fields = array();
  foreach ($type['fields'] as $field_name => $field) {
    if (in_array($field['type'], array(
      'date',
      'datestamp',
      'datetime',
    ))) {
      $fields[$field_name] = $field;
    }
  }
  return $fields;
}