function lingotek_menu in Lingotek Translation 7.4
Same name and namespace in other branches
- 6 lingotek.module \lingotek_menu()
- 7.7 lingotek.module \lingotek_menu()
- 7.2 lingotek.module \lingotek_menu()
- 7.3 lingotek.module \lingotek_menu()
- 7.5 lingotek.module \lingotek_menu()
- 7.6 lingotek.module \lingotek_menu()
Implements hook_menu().
File
- ./
lingotek.module, line 37
Code
function lingotek_menu() {
$items = array();
$items[LINGOTEK_MENU_MAIN_BASE_URL] = array(
//main menu bar link including module description
'title' => 'Translation',
'access arguments' => array(
'administer lingotek',
),
'description' => "Translate and keep your site translated using Lingotek.",
'file' => 'lingotek.admin.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'lingotek_admin_form',
),
);
$items['node/%node/lingotek_pm'] = array(
'title' => 'Translations',
'access arguments' => array(
1,
'manage projects',
),
'access callback' => 'lingotek_access',
// Enterprise Only Function
'file' => 'lingotek.page.inc',
'page arguments' => array(
1,
),
'page callback' => 'lingotek_pm',
'weight' => 1,
'type' => MENU_LOCAL_TASK,
);
$items['node/%/lingotekworkbench/%'] = array(
'title' => 'Workbench',
'access arguments' => array(
'translation',
),
'file' => 'lingotek.page.inc',
'page arguments' => array(
0,
1,
3,
),
'page callback' => 'lingotek_workbench_redirect',
'weight' => 1,
'type' => MENU_CALLBACK,
);
$items['comment/%/lingotekworkbench/%'] = array(
'title' => 'Workbench',
'access arguments' => array(
'translation',
),
'file' => 'lingotek.page.inc',
'page arguments' => array(
0,
1,
3,
),
'page callback' => 'lingotek_workbench_redirect',
'weight' => 1,
'type' => MENU_CALLBACK,
);
$items['node/%node/lingotek_dev'] = array(
'title' => 'Lingotek Developer Tools',
'access callback' => 'lingotek_access_dev_tools',
// Enterprise Only Function
'access arguments' => array(
1,
'use lingotek developer tools',
),
'description' => 'Developer Tools',
'file' => 'lingotek.dev.inc',
'page callback' => 'lingotek_dev_page',
'page arguments' => array(
1,
),
'weight' => 2,
'type' => MENU_LOCAL_TASK,
);
// Use the Standard Dashboard Interface
// Lingotek Dashboard and Settings Tabs
$items[LINGOTEK_MENU_MAIN_BASE_URL] = array_merge($items[LINGOTEK_MENU_MAIN_BASE_URL], array(
'file' => 'lingotek.dashboard.inc',
'page callback' => 'lingotek_dashboard',
'weight' => 1,
'type' => MENU_NORMAL_ITEM,
));
$items[LINGOTEK_MENU_MAIN_BASE_URL . '/dashboard'] = array(
'title' => 'Dashboard',
'type' => MENU_DEFAULT_LOCAL_TASK,
'file' => 'lingotek.dashboard.inc',
'page callback' => 'lingotek_dashboard',
'weight' => 1,
'access arguments' => array(
'administer lingotek',
),
);
$items[LINGOTEK_MENU_LANG_BASE_URL . '/dashboard'] = $items[LINGOTEK_MENU_MAIN_BASE_URL . '/dashboard'];
$items[LINGOTEK_MENU_LANG_BASE_URL] = $items[LINGOTEK_MENU_MAIN_BASE_URL];
// Add a link to regional settings
$items[LINGOTEK_MENU_LANG_BASE_URL]['title'] = 'Lingotek Translation';
$items[LINGOTEK_MENU_MAIN_BASE_URL]['access callback'] = 'lingotek_access_tlmi';
// Tab: Settings
$items[LINGOTEK_MENU_MAIN_BASE_URL . '/settings'] = array(
'title' => 'Settings',
'type' => MENU_LOCAL_TASK,
'weight' => 5,
'access arguments' => array(
'administer lingotek',
),
'description' => 'Community Translation Settings',
'file' => 'lingotek.admin.inc',
'page callback' => 'lingotek_admin_configuration_view',
);
$items[LINGOTEK_MENU_LANG_BASE_URL . '/settings'] = $items[LINGOTEK_MENU_MAIN_BASE_URL . '/settings'];
$items[LINGOTEK_MENU_MAIN_BASE_URL . '/settings/profile/%'] = array(
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer lingotek',
),
'file' => 'lingotek.admin.inc',
'page callback' => 'lingotek_admin_profile_manage',
'page arguments' => array(
5,
),
);
// Tab: Bulk Management
$items[LINGOTEK_MENU_MAIN_BASE_URL . '/manage/sync'] = array(
'title' => 'Sync',
'type' => MENU_LOCAL_TASK,
'weight' => 4,
'access arguments' => array(
'administer lingotek',
),
'description' => 'Bulk management of content translations',
'file' => 'lingotek.sync.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'lingotek_form_bulk_sync',
),
);
$items[LINGOTEK_MENU_LANG_BASE_URL . '/manage/sync'] = $items[LINGOTEK_MENU_MAIN_BASE_URL . '/manage/sync'];
// Content Update Notifications Callback
$items[LINGOTEK_NOTIFY_URL] = array(
'title' => 'Content Translation Notifications',
'type' => MENU_CALLBACK,
'access arguments' => array(
'access content',
),
'description' => 'When content translations are ready, this receives the notifications.',
'file' => 'lingotek.sync.inc',
'page callback' => 'lingotek_notifications',
);
$items[LINGOTEK_MENU_MAIN_BASE_URL . '/notifications'] = $items[LINGOTEK_NOTIFY_URL];
// allow early auto-provision community callback urls to wor
// Dashboard: Ajax Command Processor
$items['lingotek/target'] = array(
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer lingotek',
),
'description' => 'Lingotek Command Router',
'file' => 'lingotek.dashboard.inc',
'page callback' => 'lingotek_dashboard_command_ajax',
);
// Admin Configuration
$items[LINGOTEK_MENU_LANG_BASE_URL . '/config'] = array(
'title' => 'Lingotek Configuration Options',
'description' => 'The configuration options',
'file' => 'lingotek.admin.inc',
'page callback' => 'lingotek_admin_configuration_view',
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer lingotek',
),
);
$items['lingotek/sync/comment/%'] = array(
'access arguments' => array(
'administer comments',
),
'file' => 'lingotek.page.inc',
'page callback' => 'page_sync_comment_translations',
'page arguments' => array(
3,
),
'type' => MENU_CALLBACK,
);
$items['lingotek/mark-phases-complete/%node'] = array(
'access arguments' => array(
'access content',
),
'file' => 'includes/lingotek.ajax.inc',
'page callback' => 'lingotek_page_mark_phases_complete',
'page arguments' => array(
2,
),
'type' => MENU_CALLBACK,
);
//Tab: Bulk Grid
$items[LINGOTEK_MENU_MAIN_BASE_URL . '/manage'] = array(
'title' => 'Manage',
'type' => MENU_LOCAL_TASK,
'weight' => 5,
'access arguments' => array(
'administer lingotek',
),
'description' => 'Bulk grid of content translations',
'file' => 'lingotek.bulk_grid.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'lingotek_bulk_grid_form',
),
);
$items[LINGOTEK_MENU_LANG_BASE_URL . '/manage'] = $items[LINGOTEK_MENU_MAIN_BASE_URL . '/manage'];
$items[LINGOTEK_MENU_MAIN_BASE_URL . '/manage/list'] = array(
'title' => 'Content',
'description' => 'Bulk grid of content translations',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -8,
);
$items[LINGOTEK_MENU_LANG_BASE_URL . '/manage/list'] = $items[LINGOTEK_MENU_MAIN_BASE_URL . '/manage/list'];
$items[LINGOTEK_MENU_MAIN_BASE_URL . '/manage/customize'] = array(
'access arguments' => array(
'administer lingotek',
),
'file' => 'lingotek.bulk_grid.inc',
'page callback' => 'lingotek_grid_customize',
'page arguments' => array(),
'type' => MENU_CALLBACK,
);
$items[LINGOTEK_MENU_MAIN_BASE_URL . '/manage/filters'] = array(
'access arguments' => array(
'administer lingotek',
),
'file' => 'lingotek.bulk_grid.inc',
'page callback' => 'lingotek_filters_popup',
'page arguments' => array(),
'type' => MENU_CALLBACK,
);
$items[LINGOTEK_MENU_MAIN_BASE_URL . '/manage/filters/clear'] = array(
'access arguments' => array(
'administer lingotek',
),
'file' => 'lingotek.bulk_grid.inc',
'page callback' => 'lingotek_grid_clear_filters_page',
'page arguments' => array(),
'type' => MENU_CALLBACK,
);
$items[LINGOTEK_MENU_MAIN_BASE_URL . '/manage/update'] = array(
'access arguments' => array(
'administer lingotek',
),
'file' => 'lingotek.bulk_grid.inc',
'page callback' => 'lingotek_grid_update',
'page arguments' => array(),
'type' => MENU_CALLBACK,
);
$items[LINGOTEK_MENU_MAIN_BASE_URL . '/manage/download-ready'] = array(
'access arguments' => array(
'administer lingotek',
),
'file' => 'lingotek.bulk_grid.inc',
'page callback' => 'lingotek_grid_download_ready',
'page arguments' => array(),
'type' => MENU_CALLBACK,
);
$items[LINGOTEK_MENU_MAIN_BASE_URL . '/manage/edit/%'] = array(
'access arguments' => array(
'administer lingotek',
),
'file' => 'lingotek.bulk_grid.inc',
'page callback' => 'lingotek_edit_nodes',
'page arguments' => array(
5,
),
'type' => MENU_CALLBACK,
);
$items[LINGOTEK_MENU_MAIN_BASE_URL . '/manage/change-workflow/%'] = array(
'access arguments' => array(
'administer lingotek',
),
'file' => 'lingotek.bulk_grid.inc',
'page callback' => 'lingotek_change_workflow',
'page arguments' => array(
5,
),
'type' => MENU_CALLBACK,
);
$items[LINGOTEK_MENU_MAIN_BASE_URL . '/manage/reset/%'] = array(
'access arguments' => array(
'administer lingotek',
),
'file' => 'lingotek.page.inc',
'page callback' => 'lingotek_disassociate_nodes',
'page arguments' => array(
5,
),
'type' => MENU_CALLBACK,
);
$items[LINGOTEK_MENU_MAIN_BASE_URL . '/manage/delete/%'] = array(
'access arguments' => array(
'administer lingotek',
),
'file' => 'lingotek.page.inc',
'page callback' => 'lingotek_disassociate_nodes',
'page arguments' => array(
5,
),
'type' => MENU_CALLBACK,
);
// Batch Process Pages ----------------------------------------
// Sync Progress Report
$items['lingotek/sync/report'] = array(
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer lingotek',
),
'description' => 'Lingotek Sync Endpoint',
'file' => 'lingotek.sync.inc',
'page callback' => 'lingotek_sync_endpoint',
);
$items[LINGOTEK_MENU_LANG_BASE_URL . '/identify-content'] = array(
'title' => 'Test',
'type' => MENU_CALLBACK,
'weight' => 30,
'file' => 'lib/Drupal/batch/lingotek.batch.inc',
'page callback' => 'lingotek_batch_identify_content',
'access arguments' => array(
'administer lingotek',
),
);
// Easy Install Screens ----------------------------------------
// Setup Path Router
$items['admin/config/lingotek/setup'] = array(
'title' => 'Lingotek Setup Path Router',
'description' => 'Figures out the necessary setup path.',
'file' => 'lingotek.setup.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'lingotek_setup',
),
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer lingotek',
),
);
// New Account
$items['admin/config/lingotek/new-account'] = array(
'title' => 'Create a Lingotek Account',
'description' => 'Setup a new Lingotek account.',
'file' => 'lingotek.setup.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'lingotek_setup_new_account_form',
),
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer lingotek',
),
);
// Current Users
$items['admin/config/lingotek/account-settings'] = array(
'title' => 'Lingotek Account Login',
'description' => 'Manage your Lingotek account settings.',
'file' => 'lingotek.setup.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'lingotek_setup_account_settings_form',
),
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer lingotek',
),
);
$items['admin/config/lingotek/community-select'] = array(
'title' => 'Choose Your Community',
'description' => 'Select a community to use with this site.',
'file' => 'lingotek.setup.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'lingotek_community_select_form',
),
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer lingotek',
),
);
$items['admin/config/lingotek/project-vault-select'] = array(
'title' => 'Choose Your Project, Workflow, and TM Vault',
'description' => 'Select project, workflow, and translation memory vault to use.',
'file' => 'lingotek.setup.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'lingotek_project_vault_select_form',
),
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer lingotek',
),
);
// Standard Screens
$items['admin/config/lingotek/language-settings'] = array(
'title' => 'Choose Your Languages',
'description' => 'Manage your Lingotek language settings.',
'file' => 'lingotek.setup.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'lingotek_setup_language_settings_form',
),
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer lingotek',
),
);
$items['admin/config/lingotek/node-translation-settings'] = array(
'title' => 'Enable Content Types',
'description' => 'Select the nodes and fields you want translated.',
'file' => 'lingotek.setup.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'lingotek_setup_node_translation_settings_form',
),
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer lingotek',
),
);
$items['admin/config/lingotek/comment-translation-settings'] = array(
'title' => 'Enable Comment Translation',
'description' => 'Select any node types you want the comments translated.',
'file' => 'lingotek.setup.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'lingotek_setup_comment_translation_settings_form',
),
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer lingotek',
),
);
$items['admin/config/lingotek/additional-translation-settings'] = array(
'title' => 'Enable Additional Translation',
'description' => 'Select any additional types you want translated.',
'file' => 'lingotek.setup.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'lingotek_setup_additional_translation_settings_form',
),
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer lingotek',
),
);
$items['admin/config/lingotek/content-type-choose-fields-ajax/%'] = array(
'title' => 'Content Types Ajax',
'description' => 'Ajax functionality for content options.',
'file' => 'lingotek.setup.inc',
'page callback' => 'lingotek_content_type_choose_fields_callback',
'page arguments' => array(
4,
),
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer lingotek',
),
);
$items['admin/config/lingotek/setup-language-switcher'] = array(
'title' => 'Enable Language Switcher',
'description' => 'Enable the default language switcher',
'file' => 'lingotek.setup.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'lingotek_setup_language_switcher_form',
),
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer lingotek',
),
);
$items['admin/config/lingotek/setup-complete'] = array(
'title' => 'Setup Complete',
'description' => 'The Lingotek Translation module has been configured and is now ready to use.',
'file' => 'lingotek.setup.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'lingotek_setup_complete_form',
),
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer lingotek',
),
);
$items['admin/config/lingotek/node-updates'] = array(
'title' => 'Lingotek Node Updates',
'description' => 'Updates your nodes to support multiple languages.',
'file' => 'lingotek.setup.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'lingotek_setup_node_updates_form',
),
'type' => MENU_CALLBACK,
'access arguments' => array(
'administer lingotek',
),
);
return $items;
}