You are here

function mobile_tools_menu in Mobile Tools 7.3

Same name and namespace in other branches
  1. 5 mobile_tools.module \mobile_tools_menu()
  2. 6.3 mobile_tools.module \mobile_tools_menu()
  3. 6 mobile_tools.module \mobile_tools_menu()
  4. 6.2 mobile_tools.module \mobile_tools_menu()
  5. 7.2 mobile_tools.module \mobile_tools_menu()

Implements hook_menu().

File

./mobile_tools.module, line 56
Functionality to ease the creation of mixed device environments.

Code

function mobile_tools_menu() {
  $items['admin/config/system/mobile-tools'] = array(
    'title' => 'Mobile Tools',
    'description' => 'Configure how Drupal must behave for mobile devices.',
    'access arguments' => array(
      'administer mobile tools',
    ),
    'page callback' => 'mobile_tools_device_groups_list',
    'file' => 'mobile_tools.admin.inc',
  );
  $items['admin/config/system/mobile-tools/settings'] = array(
    'title' => 'Settings',
    'description' => 'Global settings for Mobile Tools',
    'access arguments' => array(
      'administer mobile tools',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mobile_tools_admin_settings_form',
    ),
    'file' => 'mobile_tools.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
  );
  $items['admin/config/system/mobile-tools/list'] = array(
    'title' => 'Device Groups',
    'description' => 'Configure how Drupal must behave for mobile devices.',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/config/system/mobile-tools/add'] = array(
    'title' => 'Add Device Group',
    'description' => 'Configure how Drupal must behave for mobile devices.',
    'access arguments' => array(
      'administer mobile tools',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mobile_tools_device_group_form',
    ),
    'type' => MENU_LOCAL_ACTION,
    'file' => 'mobile_tools.admin.inc',
  );
  $items['admin/config/system/mobile-tools/edit/%mobile_tools_device_group'] = array(
    'title' => 'Edit Device Group',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mobile_tools_device_group_form',
      5,
    ),
    'access arguments' => array(
      'administer mobile tools',
    ),
    'file' => 'mobile_tools.admin.inc',
  );
  $items['admin/config/system/mobile-tools/delete/%mobile_tools_device_group'] = array(
    'title' => 'Delete Device Group',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mobile_tools_device_group_delete_confirm',
      5,
    ),
    'access arguments' => array(
      'administer mobile tools',
    ),
    'file' => 'mobile_tools.admin.inc',
  );

  // @todo add hook_menu argument load function for %mobile_tools_device_group
  return $items;
}