function og_context_og_context_negotiation_info in Organic groups 7
Same name and namespace in other branches
- 7.2 og_context/og_context.module \og_context_og_context_negotiation_info()
Implements hook_og_context_negotiation_info().
File
- og_context/
og_context.module, line 98 - Get a group from a viewed page.
Code
function og_context_og_context_negotiation_info() {
$providers = array();
$providers['url'] = array(
'name' => t('URL'),
'description' => t("Select groups if they were passed in the URL (e.g. node/add/post?gids_node[]=4,5,6)."),
'callback' => 'og_context_handler_url',
);
$providers['node'] = array(
'name' => t('Node'),
'description' => t("Determine context by checking if a node is a group or a group content."),
'callback' => 'og_context_handler_node',
'menu path' => array(
'node/%',
'node/%/edit',
),
);
$providers['user-view'] = array(
'name' => t('User view'),
'description' => t("Determine context by checking if a user is a group or a group content on the 'user view' page."),
'callback' => 'og_context_handler_user_view',
'menu path' => array(
'user/%',
),
);
$providers['user-edit'] = array(
'name' => t('User edit'),
'description' => t("Determine context by checking if a user is a group or a group content on the 'user edit' page."),
'callback' => 'og_context_handler_user_edit',
'menu path' => array(
'user/%/edit',
),
);
return $providers;
}