You are here

function context_condition::fetch_from_context in Context 6

Same name and namespace in other branches
  1. 6.3 plugins/context_condition.inc \context_condition::fetch_from_context()
  2. 7.3 plugins/context_condition.inc \context_condition::fetch_from_context()

Retrieve options from the context provided.

10 calls to context_condition::fetch_from_context()
context_condition::condition_form in plugins/context_condition.inc
Condition form.
context_condition::editor_form_submit in plugins/context_condition.inc
Context editor form submit handler.
context_condition_context::execute in plugins/context_condition_context.inc
Execute.
context_condition_node::execute in plugins/context_condition_node.inc
context_condition_node::options_form in plugins/context_condition_node.inc
Options form. Provide additional options for your condition.

... See full list

File

plugins/context_condition.inc, line 190

Class

context_condition
Base class for a context condition.

Code

function fetch_from_context($context, $key = NULL) {
  if (isset($key)) {
    return isset($context->conditions[$this->plugin][$key]) ? $context->conditions[$this->plugin][$key] : array();
  }
  return isset($context->conditions[$this->plugin]) ? $context->conditions[$this->plugin] : array();
}