You are here

function availability_calenders_day in Availability Calendars 6.2

Same name and namespace in other branches
  1. 7.2 availability_calendars.page.inc \availability_calenders_day()

Helper function that returns the html for 1 day.

Parameters

int $day The day number.:

object $settings settings (for the current node).:

1 call to availability_calenders_day()
theme_availability_calendars_month in ./availability_calendars.page.inc
Themes the calendar for a given month.

File

./availability_calendars.page.inc, line 196

Code

function availability_calenders_day($day, $settings) {
  if (!$settings->splitday) {

    // Whole day
    $result = "<span>{$day}</span>";
  }
  else {

    // Split day: the inner span will be positioned absolute and will take care of the background.
    // However, to be able to position it absolute, it needs to be within another positioned element.
    // That's why we use an outer span: td's are not and cannot be positioned.
    // Choice between span and div: span is used less often than div in Drupal, so styles that end with "... > span > span"
    // are more specific.
    $result = "<span>{$day}<span></span></span>";
  }
  return $result;
}