You are here

function og_context_negotiation_info in Organic groups 7.2

Same name and namespace in other branches
  1. 7 og_context/og_context.module \og_context_negotiation_info()

Return all the defined group context providers.

Return value

An array of group context providers.

3 calls to og_context_negotiation_info()
og_context_configure_form in og_context/og_context.admin.inc
Setting for language negotiation options
og_context_determine_context in og_context/og_context.module
Determine the best matching context of a viewed page.
og_context_negotiation_set in og_context/og_context.module
Save a list of language providers.

File

og_context/og_context.module, line 315
Get a group from a viewed page.

Code

function og_context_negotiation_info() {
  $group_context_providers =& drupal_static(__FUNCTION__);
  if (!isset($group_context_providers)) {

    // Collect all the module-defined og_context negotiation providers.
    $group_context_providers = module_invoke_all('og_context_negotiation_info');

    // Let other modules alter the list of og_context providers.
    drupal_alter('og_context_negotiation_info', $group_context_providers);
  }

  // Assign default values.
  foreach ($group_context_providers as &$group_context_provider) {
    $group_context_provider += array(
      'menu path' => array(),
    );
  }
  return $group_context_providers;
}