function context_condition::fetch_from_context

cis7 context_condition.inc context_condition::fetch_from_context($context, $key = NULL)
cle7 context_condition.inc context_condition::fetch_from_context($context, $key = NULL)
elmsmedia7 context_condition.inc context_condition::fetch_from_context($context, $key = NULL)
icor7 context_condition.inc context_condition::fetch_from_context($context, $key = NULL)
meedjum_blog7 context_condition.inc context_condition::fetch_from_context($context, $key = NULL)
mooc7 context_condition.inc context_condition::fetch_from_context($context, $key = NULL)

Retrieve options from the context provided.

19 calls to context_condition::fetch_from_context()
context_condition::condition_form in sites/all/modules/ulmus/context/plugins/context_condition.inc
Condition form.
context_condition::editor_form_submit in sites/all/modules/ulmus/context/plugins/context_condition.inc
Context editor form submit handler.
context_condition_context::execute in sites/all/modules/ulmus/context/plugins/context_condition_context.inc
Execute.
context_condition_context_all::execute in sites/all/modules/ulmus/context/plugins/context_condition_context_all.inc
Execute.
context_condition_node::execute in sites/all/modules/ulmus/context/plugins/context_condition_node.inc

... See full list

File

sites/all/modules/ulmus/context/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();
}