You are here

function calendar_is_calendar_arg in Calendar 5

Same name and namespace in other branches
  1. 5.2 calendar.module \calendar_is_calendar_arg()

Is the current argument a calendar argument. Used to sort out whether or not to display the calendar at each point.

3 calls to calendar_is_calendar_arg()
calendar_views_query_alter in ./calendar.module
Implementation of hook_views_query() Insert filters into the query based on the current calendar view and the selected fields Used when the actual view arguments don't provide enough info to construct the query. i.e. on a view with no arguments…
theme_calendar_view_calendar in ./calendar.theme
Calendar Views plugin theme, overrides default views theme to create a calendar view.
theme_calendar_view_summary in ./calendar.theme
Calendar summary display.

File

./calendar.module, line 1270
Adds calendar filtering and displays to Views.

Code

function calendar_is_calendar_arg($view) {
  if (empty($view->real_args)) {
    $delta = 0;
  }
  else {
    $delta = max(array_keys($view->real_args));
  }
  if (in_array($delta, calendar_arg_positions($view))) {
    return TRUE;
  }
  return FALSE;
}