function user_relationshipsactivity_menu in Activity 6
Same name and namespace in other branches
- 5.4 contrib/user_relationshipsactivity/user_relationshipsactivity.module \user_relationshipsactivity_menu()
Implementation of hook_menu().
File
- contrib/
user_relationshipsactivity/ user_relationshipsactivity.module, line 212
Code
function user_relationshipsactivity_menu() {
$items = array();
if ($types = user_relationships_types_load()) {
foreach ($types as $rtid => $type) {
$items['activity/' . preg_replace('/\\s/', '_', drupal_strtolower($type->plural_name))] = array(
'title callback' => '_user_relationshipsactivity_menu_title',
'title arguments' => array(
$type->plural_name,
),
'page callback' => 'user_relationshipsactivity_page',
'page arguments' => array(
$type->rtid,
),
'access callback' => 'user_access',
'access arguments' => array(
'view own activity',
),
'weight' => 2,
'type' => MENU_LOCAL_TASK,
);
}
}
return $items;
}