You are here

function context_condition::condition_used in Context 6.3

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

Check whether this condition is used by any contexts. Can be used to prevent expensive condition checks from being triggered when no contexts use this condition.

5 calls to context_condition::condition_used()
context_condition_bookroot::execute in plugins/context_condition_bookroot.inc
context_condition_context::execute in plugins/context_condition_context.inc
Execute.
context_condition_menu::execute in plugins/context_condition_menu.inc
Override of execute().
context_condition_node_taxonomy::execute in plugins/context_condition_node_taxonomy.inc
context_condition_path::execute in plugins/context_condition_path.inc
Execute.

File

plugins/context_condition.inc, line 151

Class

context_condition
Base class for a context condition.

Code

function condition_used() {
  $map = context_condition_map();
  return !empty($map[$this->plugin]);
}