You are here

function calendar_week_header in Calendar 5

Same name and namespace in other branches
  1. 5.2 calendar.inc \calendar_week_header()
  2. 6.2 calendar.module \calendar_week_header()
  3. 7.3 calendar.module \calendar_week_header()
  4. 7 calendar.module \calendar_week_header()
  5. 7.2 calendar.module \calendar_week_header()

Formats the weekday information into table header format

Return value

array with weekday table header data

1 call to calendar_week_header()
calendar_get_calendar in ./calendar_api.inc
Adapted from event_get_calendar() function in the event module Reworked to remove dependency on event module

File

./calendar_api.inc, line 455

Code

function calendar_week_header($mini = FALSE, $with_week = TRUE) {

  // create week header
  $days = calendar_week_days();
  if ($with_week) {
    $row[] = array(
      'class' => "days week",
      'data' => ' ',
    );
  }
  foreach ($days as $day) {
    $row[] = array(
      'class' => strtolower("days " . $day['day']),
      'data' => $mini ? drupal_substr($day['t'], 0, 1) : $day['t'],
    );
  }
  return $row;
}