You are here

function theme_fullcalendar_link in FullCalendar 7

Same name and namespace in other branches
  1. 6 fullcalendar.module \theme_fullcalendar_link()

Sets the text for the fallback display.

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

File

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

Code

function theme_fullcalendar_link($variables) {
  $node = $variables['node'];
  $attributes = $variables['attributes'];
  $index = $variables['index'];
  $text = date_format_date($attributes['start']);
  if (!$attributes['allDay']) {
    $text .= ' to ' . date_format_date($attributes['end']);
  }
  $attributes['index'] = $index;
  $attributes['start'] = $attributes['start']
    ->format(DATE_FORMAT_DATETIME);
  $attributes['end'] = $attributes['end']
    ->format(DATE_FORMAT_DATETIME);
  return l($text, $node->url, array(
    'attributes' => $attributes,
  ));
}