function context_condition_menu::execute in Context 6
Same name and namespace in other branches
- 6.3 plugins/context_condition_menu.inc \context_condition_menu::execute()
- 7.3 plugins/context_condition_menu.inc \context_condition_menu::execute()
Override of execute().
File
- plugins/
context_condition_menu.inc, line 66
Class
- context_condition_menu
- Expose menu items as a context condition.
Code
function execute() {
if ($this
->condition_used()) {
$trail = menu_get_active_trail();
foreach ($trail as $item) {
if (!empty($item['href'])) {
foreach ($this
->get_contexts($item['href']) as $context) {
$this
->condition_met($context, $item['href']);
}
}
}
}
}