function environment_context_condition::execute in Environment 6
Same name and namespace in other branches
- 7 modules/environment_context/plugins/environment_context_condition.inc \environment_context_condition::execute()
Override for context_condition::execute().
File
- plugins/
environment_context_condition.inc, line 17
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);
}
}
}
}