class environment_context_condition in Environment 6
Same name and namespace in other branches
- 7 modules/environment_context/plugins/environment_context_condition.inc \environment_context_condition
 
Defines a context condition for the current environment state.
Hierarchy
- class \environment_context_condition extends \context_condition
 
Expanded class hierarchy of environment_context_condition
2 string references to 'environment_context_condition'
- environment_context_plugins in plugins/
environment.context.inc  - Implementation of hook_context_plugins().
 - environment_context_registry in plugins/
environment.context.inc  - Implementation of hook_context_registry().
 
File
- plugins/
environment_context_condition.inc, line 6  
View source
class environment_context_condition extends context_condition {
  /**
   * Override for context_condition::condition_values().
   */
  function condition_values() {
    return _environment_state_options_all();
  }
  /**
   * Override for context_condition::execute().
   */
  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);
        }
      }
    }
  }
}Members
| 
            Name | 
                  Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| 
            environment_context_condition:: | 
                  function | Override for context_condition::condition_values(). | ||
| 
            environment_context_condition:: | 
                  function | Override for context_condition::execute(). |