function domain_menu in Domain Access 7.2
Same name and namespace in other branches
- 5 domain.module \domain_menu()
- 6.2 domain.module \domain_menu()
- 7.3 domain.module \domain_menu()
Implements hook_menu()
File
- ./
domain.module, line 173 - Core module functions for the Domain Access suite.
Code
function domain_menu() {
$items = array();
$admin = user_access('administer domains');
$items['admin/structure/domain'] = array(
'title' => 'Domains',
'access arguments' => array(
'administer domains',
),
'page callback' => 'domain_view',
'file' => 'domain.admin.inc',
'description' => 'Manage and configure domains.',
);
$items['admin/structure/domain/view'] = array(
'title' => 'Domain list',
'access arguments' => array(
'administer domains',
),
'page callback' => 'domain_view',
'type' => MENU_DEFAULT_LOCAL_TASK,
'file' => 'domain.admin.inc',
'description' => 'View list of registered domains.',
'weight' => -10,
);
$items['admin/structure/domain/settings'] = array(
'title' => 'Settings',
'access arguments' => array(
'administer domains',
),
'type' => MENU_LOCAL_TASK,
'page callback' => 'domain_configure',
'file' => 'domain.admin.inc',
'description' => 'Configure Domain Access settings.',
'weight' => -8,
);
$items['admin/structure/domain/create'] = array(
'title' => 'Create domain',
'access arguments' => array(
'administer domains',
),
'type' => MENU_LOCAL_ACTION,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'domain_form',
),
'file' => 'domain.admin.inc',
'description' => 'Create new domain record.',
'weight' => -7,
);
$items['admin/structure/domain/advanced'] = array(
'title' => 'Node settings',
'access arguments' => array(
'administer domains',
),
'type' => MENU_LOCAL_TASK,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'domain_advanced_form',
),
'file' => 'domain.admin.inc',
'description' => 'Configure content creation settings for domains.',
'weight' => -6,
);
// Register the batch actions as menu callbacks
$batch = module_invoke_all('domainbatch');
if (!empty($batch)) {
$items['admin/structure/domain/batch'] = array(
'title' => 'Batch updating',
'access arguments' => array(
'administer domains',
),
'type' => MENU_LOCAL_TASK,
'page callback' => 'domain_batch',
'file' => 'domain.admin.inc',
'description' => 'Batch update domain settings.',
'weight' => -5,
);
// Get the submenu items
foreach ($batch as $key => $value) {
$items['admin/structure/domain/batch/' . $key] = array(
'title' => $value['#form']['#title'],
'access arguments' => isset($value['#permission']) ? array(
$value['#permission'],
) : array(
'administer domains',
),
'type' => MENU_VISIBLE_IN_BREADCRUMB,
'page callback' => 'domain_batch',
'page arguments' => array(
$key,
),
'file' => 'domain.admin.inc',
'description' => isset($value['#description']) ? $value['#description'] : '',
'weight' => isset($value['#weight']) ? $value['#weight'] : 0,
);
}
}
$items['admin/structure/domain/roles'] = array(
'title' => 'User defaults',
'access arguments' => array(
'administer domains',
),
'type' => MENU_LOCAL_TASK,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'domain_roles_form',
),
'file' => 'domain.admin.inc',
'description' => 'Default domain settings for users.',
'weight' => -4,
);
$items['admin/structure/domain/edit/%domain'] = array(
'title' => 'Edit domain record',
'access arguments' => array(
'administer domains',
),
'type' => MENU_VISIBLE_IN_BREADCRUMB,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'domain_form',
4,
),
'description' => 'Edit domain record.',
'file' => 'domain.admin.inc',
);
$items['admin/structure/domain/delete/%domain'] = array(
'title' => 'Delete domain record',
'access arguments' => array(
'administer domains',
),
'type' => MENU_VISIBLE_IN_BREADCRUMB,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'domain_delete_form',
4,
),
'description' => 'Delete domain record.',
'file' => 'domain.admin.inc',
);
return $items;
}