function context_condition_views::execute in Context 6.3
Same name and namespace in other branches
- 6 plugins/context_condition_views.inc \context_condition_views::execute()
- 7.3 plugins/context_condition_views.inc \context_condition_views::execute()
File
- plugins/
context_condition_views.inc, line 31
Class
Code
function execute($view) {
switch ($view->display_handler->display->display_plugin) {
case 'page':
case 'calendar':
// Set contexts for this view.
foreach ($this
->get_contexts($view->name) as $context) {
$this
->condition_met($context, $view->name);
}
// Set any contexts associated with the current display
if (!empty($view->current_display)) {
foreach ($this
->get_contexts("{$view->name}:{$view->current_display}") as $context) {
$this
->condition_met($context, "{$view->name}:{$view->current_display}");
}
}
break;
}
}