function environment_context_condition::execute in Environment 7
Same name and namespace in other branches
- 6 plugins/environment_context_condition.inc \environment_context_condition::execute()
Override for context_condition::execute().
File
- modules/
environment_context/ plugins/ environment_context_condition.inc, line 21 - Defines a context condition for the current environment state.
Class
- environment_context_condition
- Defines a context condition for the current environment state.
Code
function execute($environment) {
if ($this
->condition_used()) {
// Workflow should be a unique key, $env is unique but not it's title.
foreach ($environment as $workflow => $env) {
foreach ($this
->get_contexts($env) as $context) {
$this
->condition_met($context, $env);
}
foreach ($this
->get_contexts($workflow) as $context) {
$this
->condition_met($context, $workflow);
}
}
}
}