function calendar_is_last_arg in Calendar 5.2
Same name and namespace in other branches
- 5 calendar.module \calendar_is_last_arg()
Identify the final calendar argument in this view. Needed because we can't construct a query until we know all the calendar elements. Used to tell when to add the filter to the query object.
Parameters
object $view:
Return value
string $argtype
1 call to calendar_is_last_arg()
- calendar_handler_arg_type in ./
calendar.module - Custom views handler for all calendar arguments.
File
- ./
calendar.module, line 721 - Adds calendar filtering and displays to Views.
Code
function calendar_is_last_arg($view, $reset = FALSE) {
foreach ($view->argument as $argument) {
if (in_array($argument['id'], calendar_args())) {
$calendar_arg = $argument['id'];
}
$max = $argument['id'];
}
return $max < $calendar_arg;
}