You are here

function og_set_breadcrumb in Organic groups 7

Same name and namespace in other branches
  1. 7.2 og.module \og_set_breadcrumb()

Set breadcrumbs according to a given group.

Parameters

$entity_type: The entity type.

$etid: The entity ID.

$path: Optional; The path to append to the breadcrumb.

5 calls to og_set_breadcrumb()
og_ui_add_users in og_ui/og_ui.admin.inc
Add users to group form.
og_ui_group_admin_overview in og_ui/og_ui.admin.inc
Provide an overview of the administrator menu items.
og_ui_user_admin_account in og_ui/og_ui.admin.inc
Form builder; OG user administration page.
og_ui_user_admin_permissions in og_ui/og_ui.admin.inc
Menu callback: administer permissions.
og_ui_user_admin_roles in og_ui/og_ui.admin.inc
Menu callback: administer roles.

File

./og.module, line 2975
Enable users to create and manage groups with roles and permissions.

Code

function og_set_breadcrumb($entity_type, $etid, $path = array()) {
  if ($entity = entity_load($entity_type, array(
    $etid,
  ))) {
    $entity = reset($entity);
    $label = og_entity_label($entity_type, $entity);
    $uri = entity_uri($entity_type, $entity);
    drupal_set_breadcrumb(array_merge(array(
      l(t('Home'), '<front>'),
    ), array(
      l($label, $uri['path']),
    ), $path));
  }
}