function glossify_menu in Glossify 6
Same name and namespace in other branches
- 5 glossify.module \glossify_menu()
- 6.3 glossify.module \glossify_menu()
Implementation of hook_menu().
File
- ./
glossify.module, line 15
Code
function glossify_menu() {
$items['admin/settings/glossify'] = array(
'title' => 'Glossify',
'description' => 'Manipulate glossify behaviour',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'glossify_admin_settings',
),
'access arguments' => array(
'administer glossify',
),
'file' => 'glossify.admin.inc',
);
$weight = 1;
$items['admin/settings/glossify/global'] = array(
'type' => MENU_DEFAULT_LOCAL_TASK,
'title' => t('Global'),
'weight' => $weight,
);
$configurations = variable_get('glossify_configurations', array());
foreach ($configurations as $configuration => $values) {
if ($configuration !== 'global') {
$weight++;
$items["admin/settings/glossify/{$configuration}"] = array(
'type' => MENU_LOCAL_TASK,
'title' => $configuration,
'page arguments' => array(
'glossify_admin_settings',
),
'access arguments' => array(
'administer glossify',
),
'file' => 'glossify.admin.inc',
'weight' => $weight,
);
}
}
$items['admin/settings/glossify/add'] = array(
'type' => MENU_LOCAL_TASK,
'title' => t('Add a new configuration'),
'page arguments' => array(
'glossify_admin_settings',
),
'access arguments' => array(
'administer glossify',
),
'file' => 'glossify.admin.inc',
'weight' => 99,
);
return $items;
}