function lingotek_menu in Lingotek Translation 7.3
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.4 lingotek.module \lingotek_menu()
- 7.5 lingotek.module \lingotek_menu()
- 7.6 lingotek.module \lingotek_menu()
Implements hook_menu().
File
- ./
lingotek.module, line 36
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/%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_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'];
// Tab: Bulk Management
$items[LINGOTEK_MENU_MAIN_BASE_URL . '/sync'] = array(
'title' => 'Bulk Management',
'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 . '/sync'] = $items[LINGOTEK_MENU_MAIN_BASE_URL . '/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,
);
// 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/community-settings-select'] = array(
'title' => 'Choose Your Project, Workflow, and TM Vault',
'description' => 'Select project, workflow, and TM vault to use.',
'file' => 'lingotek.setup.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'lingotek_community_settings_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/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;
}