function defaultcontent_condition::execute in Default Content 7
Same name and namespace in other branches
- 7.2 context/plugins/defaultcontent_condition.inc \defaultcontent_condition::execute()
Execute.
File
- context/
plugins/ defaultcontent_condition.inc, line 43
Class
Code
function execute($node) {
if (!isset($node->machine_name)) {
return;
}
if ($this
->condition_used()) {
foreach ($this
->get_contexts() as $context) {
$machine_names = $this
->fetch_from_context($context, 'values');
if (in_array($node->machine_name, $machine_names)) {
$this
->condition_met($context);
}
}
}
}