function custompage_context_condition_alias::execute in Custom Page 7
Same name and namespace in other branches
- 6 plugins/custompage_context_condition_alias.inc \custompage_context_condition_alias::execute()
File
- plugins/
custompage_context_condition_alias.inc, line 13
Class
- custompage_context_condition_alias
- Expose node views/node forms of specific node types as a context condition.
Code
function execute($path_key) {
if (empty($path_key)) {
return;
}
foreach (context_enabled_contexts() as $context) {
if ($paths = $this
->fetch_from_context($context, 'values')) {
if (in_array($path_key, $paths)) {
$this
->condition_met($context, $path_key);
}
}
}
}