You are here

function og_set_breadcrumb in Organic groups 7.2

Same name and namespace in other branches
  1. 7 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.

7 calls to og_set_breadcrumb()
og_ui_add_users in og_ui/og_ui.admin.inc
Add users to group form.
og_ui_admin_account in og_ui/og_ui.admin.inc
Form builder; OG user administration page.
og_ui_admin_permissions in og_ui/og_ui.admin.inc
Menu callback: administer permissions.
og_ui_admin_roles in og_ui/og_ui.admin.inc
Menu callback: administer roles.
og_ui_delete_membership in og_ui/og_ui.admin.inc
Delete a single membership from group.

... See full list

File

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

Code

function og_set_breadcrumb($entity_type, $etid, $path = array()) {
  $entity = entity_load_single($entity_type, $etid);
  $label = 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));
}