public function GroupTypeUIController::hook_menu in Group 7
Provides definitions for implementing hook_menu().
Overrides EntityDefaultUIController::hook_menu
File
- classes/
group_type.ui_controller.inc, line 15 - Defines the Entity API UI class for group types.
Class
- GroupTypeUIController
- UI class for group types.
Code
public function hook_menu() {
$items = parent::hook_menu();
$items[$this->path]['type'] = MENU_LOCAL_TASK;
$items[$this->path]['weight'] = -5;
$items["{$this->path}/manage/%entity_object/edit"]['weight'] = -10;
$items["{$this->path}/manage/%group_type/permissions"] = array(
'title' => 'Permissions',
'description' => 'Edit permissions for groups of this type',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'group_permission_form',
4,
),
'access callback' => 'user_access',
'access arguments' => array(
'configure group module',
),
'file' => 'admin/group.permission.inc',
'file path' => drupal_get_path('module', 'group'),
'type' => MENU_LOCAL_TASK,
'weight' => 0,
);
$items["{$this->path}/manage/%group_type/permissions/list"] = array(
'title' => 'Permissions',
'description' => 'Edit permissions for this group type',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 0,
);
$items["{$this->path}/manage/%group_type/permissions/roles"] = array(
'title' => 'Roles',
'description' => 'Manage group roles for this group type.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'group_role_overview_form',
'group_role',
4,
),
'access callback' => 'user_access',
'access arguments' => array(
'configure group module',
),
'file' => 'includes/entity.ui.inc',
'type' => MENU_LOCAL_TASK,
'weight' => 5,
);
$items["{$this->path}/manage/%group_type/permissions/roles/add"] = array(
'title' => 'Add group role',
'page callback' => 'group_type_add_role_form',
'page arguments' => array(
4,
),
'access callback' => 'group_type_add_role_access',
'access arguments' => array(
4,
),
'file' => 'admin/group_role.inc',
'file path' => drupal_get_path('module', 'group'),
'type' => MENU_LOCAL_ACTION,
'weight' => 0,
);
$items["{$this->path}/manage/%group_type/config"] = array(
'title' => 'Config',
'description' => 'Configure the group type.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'group_type_config_form',
4,
),
'access callback' => 'user_access',
'access arguments' => array(
'configure group module',
),
'file' => 'admin/group_type.config.inc',
'file path' => drupal_get_path('module', 'group'),
'type' => MENU_LOCAL_TASK,
'weight' => -5,
);
$items["{$this->path}/manage/%group_type/config/owner"] = array(
'title' => 'Group owner',
'description' => 'Configuration of the creating member.',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
return $items;
}