You are here

function hook_context_node_condition_alter in Context 7.3

Same name and namespace in other branches
  1. 6.3 context.api.php \hook_context_node_condition_alter()
  2. 6 context.api.php \hook_context_node_condition_alter()

Alter/add a condition to a node-related event.

Allows modules to add one or more context condition plugin executions to a node view, form, etc.

Parameters

$node: The node object.

$op: The node-related operation: 'node', 'form', 'comment'.

1 invocation of hook_context_node_condition_alter()
context_node_condition in ./context.core.inc
Centralized node condition call function for the ever increasing number of ways to get at a node view / node form.

File

./context.api.php, line 106
Hooks provided by Context.

Code

function hook_context_node_condition_alter(&$node, $op) {
  if ($plugin = context_get_plugin('condition', 'bar')) {
    $plugin
      ->execute($node, $op);
  }
}