You are here

function zopim_menu in Zopim Live Chat 6.2

Same name and namespace in other branches
  1. 6 zopim.module \zopim_menu()
  2. 7 zopim.module \zopim_menu()

File

./zopim.module, line 37

Code

function zopim_menu() {
  $includes = drupal_get_path('module', 'zopim') . '/includes';

  // Account settings
  $items['admin/settings/zopim'] = array(
    'title' => 'Zopim',
    'description' => t('Configuration for the Zopim module.'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'zopim_admin_settings_form',
    ),
    'access arguments' => array(
      'administer zopim',
    ),
    'file' => 'zopim-account.admin.inc',
    'file path' => $includes,
    'type' => MENU_NORMAL_ITEM,
  );

  // Setup default local task, same as normal item, with a few exceptions.
  $items['admin/settings/zopim/account'] = $items['admin/settings/zopim'];
  $items['admin/settings/zopim/account']['title'] = 'Account Settings';
  $items['admin/settings/zopim/account']['description'] = t('Configure the account settings for your Zopim account.');
  $items['admin/settings/zopim/account']['type'] = MENU_DEFAULT_LOCAL_TASK;
  $items['admin/settings/zopim/account']['weight'] = 0;

  // Visibility settings
  $items['admin/settings/zopim/visibility'] = array(
    'title' => 'Visibility',
    'description' => "Configure the settings used to determine the widget's visibility.",
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'zopim_admin_settings_form',
    ),
    'access arguments' => array(
      'administer zopim',
    ),
    'file' => 'zopim-visibility.admin.inc',
    'file path' => $includes,
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
  );

  // Widget customization
  $items['admin/settings/zopim/customize'] = array(
    'title' => 'Customize Widget',
    'description' => 'Configure the settings used to generate your Zopim code.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'zopim_admin_settings_form',
    ),
    'access arguments' => array(
      'administer zopim',
    ),
    'file' => 'zopim-customize.admin.inc',
    'file path' => $includes,
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
  );
  return $items;
}