function hook_og_context_negotiation_info

7.x-2.x og_context.api.php hook_og_context_negotiation_info()
7.x-1.x og_context.api.php hook_og_context_negotiation_info()

Add context negotiation info.

Define context "handlers".

  • name: The human readable name of the context handler.
  • Description: The description of the context handler.
  • callback: The name of an implementation of callback_og_context_handler().
  • menu path: Optional; The menu path as retrieved from menu_get_item() that is required for the context handler to be invoked.
1 function implements hook_og_context_negotiation_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

og_context_og_context_negotiation_info in og/og_context/og_context.module
Implements hook_og_context_negotiation_info().
1 invocation of hook_og_context_negotiation_info()
og_context_negotiation_info in og/og_context/og_context.module
Return all the defined group context providers.

File

og/og_context/og_context.api.php, line 24
Hooks provided by the Organic groups context module.

Code

function hook_og_context_negotiation_info() {
  $providers = array();

  $providers['foo'] = array(
    'name' => t('Foo'),
    'description' => t("Determine context by checking if some foo value."),
    'callback' => 'foo_og_context_handler',
    
    // Invoke the context handler only on the following path.
    'menu path' => array('foo/%', 'foo/%/bar'),
  );

  return $providers;
}