function hook_og_context_negotiation_info in Organic groups 7
Same name and namespace in other branches
- 7.2 og_context/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 desciption of the context handler.
- callback: The callback function that will evaluate and return the group IDs that it finds.
- 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_context/
og_context.module - Implements hook_og_context_negotiation_info().
1 invocation of hook_og_context_negotiation_info()
- og_context_negotiation_info in og_context/
og_context.module - Return all the defined group context providers.
File
- og_context/
og_context.api.php, line 25 - 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;
}