function group_group_operation_links in Group 7
Implements hook_group_operation_links().
File
- ./
group.group.inc, line 125 - Hook implementations for the Group module.
Code
function group_group_operation_links(Group $group) {
$operations = array();
// Retrieve the destination url.
$destination = drupal_get_destination();
// Add an 'edit' link if available.
if (group_access('update', $group)) {
$operations['edit'] = array(
'title' => t('edit'),
'href' => "group/{$group->gid}/edit",
'query' => $destination,
);
}
// Add a 'delete' link if available.
if (group_access('delete', $group)) {
$operations['delete'] = array(
'title' => t('delete'),
'href' => "group/{$group->gid}/delete",
'query' => $destination,
);
}
return $operations;
}