You are here

function content_type_groups_menu in Content type groups 7

Implements hook_menu().

File

./content_type_groups.module, line 22
Module file for the Content type groups module.

Code

function content_type_groups_menu() {
  $items = array();

  // Main list page
  $items['admin/structure/types/groups'] = array(
    'title' => 'Content type groups',
    'description' => 'Manage content type groups',
    'page callback' => 'content_type_groups_admin',
    'access arguments' => array(
      'administer content types',
    ),
    // This permission is good enough for now. Does it really need a separate permission, honestly?
    'file' => 'content_type_groups.admin.inc',
    'type' => MENU_LOCAL_ACTION,
  );

  // Add new group page
  $items['admin/structure/types/groups/add'] = array(
    'title' => 'Add content type group',
    'description' => 'Add a new content type group',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'content_type_groups_group_form',
    ),
    'access arguments' => array(
      'administer content types',
    ),
    // This permission is good enough for now. Does it really need a separate permission, honestly?
    'file' => 'content_type_groups.admin.inc',
    'type' => MENU_LOCAL_ACTION,
  );

  // Edit existing group page
  $items['admin/structure/types/groups/manage/%'] = array(
    'title' => 'Edit content type group',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'content_type_groups_group_form',
      5,
    ),
    'access arguments' => array(
      'administer content types',
    ),
    'file' => 'content_type_groups.admin.inc',
  );
  $items['admin/structure/types/groups/manage/%/edit'] = array(
    'title' => 'Edit',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );

  // Delete existing group page
  $items['admin/structure/types/groups/manage/%/delete'] = array(
    'title' => 'Delete',
    'page arguments' => array(
      'content_type_groups_group_delete_confirm',
      5,
    ),
    'access arguments' => array(
      'administer content types',
    ),
    'file' => 'content_type_groups.admin.inc',
  );
  return $items;
}