You are here

function calendar_is_calendar_arg in Calendar 5.2

Same name and namespace in other branches
  1. 5 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.

4 calls to calendar_is_calendar_arg()
calendar_views_pre_view in ./calendar.module
Implementation of hook_views_pre_view()
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_views_summary in ./calendar.theme
Calendar summary display.
_calendar_views_query_alter in ./calendar.inc
@file All the code used while processing a calendar is stored in this file and is included only when needed.

File

./calendar.module, line 700
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;
}