function skinr_context_ui_menu in Skinr 8.2
Same name and namespace in other branches
- 7.2 skinr_context/skinr_context_ui.module \skinr_context_ui_menu()
Implements hook_menu().
File
- skinr_context/
skinr_context_ui.module, line 11 - Administrative interface for Skinr Context. Without this module, you cannot edit your skins with context.
Code
function skinr_context_ui_menu() {
// Administration.
$items['admin/structure/skinr/list/skins'] = array(
'title' => 'Skins',
'description' => t('Manage skin configurations.'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/structure/skinr/list/groups'] = array(
'title' => 'Groups',
'description' => t('Manage skin configuration groups.'),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'skinr_context_ui_admin_list',
),
'access arguments' => array(
'administer skinr',
),
'type' => MENU_LOCAL_TASK,
'file' => 'skinr_context_ui.admin.inc',
);
// Configure skin configuration group for an element.
$items['admin/structure/skinr/edit/%/%/%skinr_context_group'] = array(
'title' => 'Edit skin',
'title callback' => 'skinr_context_ui_edit_title',
'title arguments' => array(
4,
5,
6,
),
'page callback' => 'skinr_context_ui_edit',
'page arguments' => array(
4,
5,
6,
),
// module, element, gid
'type' => MENU_LOCAL_TASK,
'access arguments' => array(
'edit skin settings',
),
'file' => 'skinr_context_ui.edit.inc',
);
// Add skin configuration group to an element.
$items['admin/structure/skinr/edit/%/%/add'] = array(
'title' => 'Add group',
'page callback' => 'skinr_context_ui_group_add',
'page arguments' => array(
4,
5,
),
// module, element
'type' => MENU_LOCAL_ACTION,
'access arguments' => array(
'edit skin settings',
),
'file' => 'skinr_context_ui.edit.inc',
);
// Enable a skin configuration group.
$items['admin/structure/skinr/group/%skinr_context_group/enable'] = array(
'title' => 'Enable group',
'page callback' => 'skinr_context_ui_group_status_set',
'page arguments' => array(
4,
TRUE,
),
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer skinr',
),
'file' => 'skinr_context_ui.admin.inc',
);
// Disable a skin configuration group.
$items['admin/structure/skinr/group/%skinr_context_group/disable'] = array(
'title' => 'Disable group',
'page callback' => 'skinr_context_ui_group_status_set',
'page arguments' => array(
4,
FALSE,
),
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer skinr',
),
'file' => 'skinr_context_ui.admin.inc',
);
// Revert a skin configuration group.
$items['admin/structure/skinr/group/%skinr_context_group/revert'] = array(
'title' => 'Revert group',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'skinr_context_ui_revert_confirm',
4,
),
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer skinr',
),
'file' => 'skinr_context_ui.admin.inc',
);
// Delete a skin configuration group.
$items['admin/structure/skinr/edit/%/%/%skinr_context_group/delete'] = array(
'title' => 'Delete group',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'skinr_context_ui_group_delete_confirm',
6,
),
'type' => MENU_CALLBACK,
'access arguments' => array(
'edit skin settings',
),
'file' => 'skinr_context_ui.edit.inc',
);
return $items;
}