function tac_lite_menu in Taxonomy Access Control Lite 7
Same name and namespace in other branches
- 5 tac_lite.module \tac_lite_menu()
- 6 tac_lite.module \tac_lite_menu()
Implementation of hook_menu().
File
- ./
tac_lite.module, line 56 - Control access to site content based on taxonomy, roles and users.
Code
function tac_lite_menu() {
global $user;
$items = array();
$items['admin/config/people/tac_lite'] = array(
'title' => 'Access by Taxonomy',
'description' => "taxonomy-based permissions by tac_lite",
'page callback' => 'drupal_get_form',
'page arguments' => array(
'tac_lite_admin_settings',
),
'weight' => 1,
// after 'roles' tab
'access arguments' => array(
'administer tac_lite',
),
);
$items['admin/config/people/tac_lite/settings'] = array(
'title' => 'Settings',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -1,
'access arguments' => array(
'administer tac_lite',
),
);
$schemes = variable_get('tac_lite_schemes', 1);
for ($i = 1; $i <= $schemes; $i++) {
$scheme = variable_get('tac_lite_config_scheme_' . $i, FALSE);
if ($scheme) {
$title = $scheme['name'];
}
else {
$title = "Scheme {$i}";
}
$items['admin/config/people/tac_lite/scheme_' . $i] = array(
'title' => $title,
'page callback' => 'tac_lite_admin_settings_scheme',
'page arguments' => array(
(string) $i,
),
'type' => MENU_LOCAL_TASK,
'weight' => $i,
'access arguments' => array(
'administer tac_lite',
),
);
}
return $items;
}