function fieldgroup_menu in Content Construction Kit (CCK) 6.2
Same name and namespace in other branches
- 5 fieldgroup.module \fieldgroup_menu()
- 6.3 modules/fieldgroup/fieldgroup.module \fieldgroup_menu()
- 6 modules/fieldgroup/fieldgroup.module \fieldgroup_menu()
Implementation of hook_menu().
File
- modules/
fieldgroup/ fieldgroup.module, line 33 - Create field groups for CCK fields.
Code
function fieldgroup_menu() {
$items = array();
// Make sure this doesn't fire until content_types is working,
// needed to avoid errors on initial installation.
if (!defined('MAINTENANCE_MODE')) {
foreach (node_get_types() as $type) {
$type_name = $type->type;
$content_type = content_types($type_name);
$type_url_str = $content_type['url_str'];
$items['admin/content/node-type/' . $type_url_str . '/groups/%'] = array(
'title' => 'Edit group',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'fieldgroup_group_edit_form',
$type_name,
5,
),
'access arguments' => array(
'administer content types',
),
'type' => MENU_CALLBACK,
);
$items['admin/content/node-type/' . $type_url_str . '/groups/%/remove'] = array(
'title' => 'Edit group',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'fieldgroup_remove_group',
$type_name,
5,
),
'access arguments' => array(
'administer content types',
),
'type' => MENU_CALLBACK,
);
}
}
return $items;
}