You are here

function twilio_menu in Twilio 7

Implements hook_menu().

File

./twilio.module, line 31
Twilio module

Code

function twilio_menu() {
  $items[TWILIO_ADMIN_PATH] = array(
    'title' => 'Twilio',
    'description' => 'Administer your twilio settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'twilio_admin_form',
    ),
    'access arguments' => array(
      'administer twilio',
    ),
    'file' => 'twilio.admin.inc',
  );
  $items[TWILIO_ADMIN_PATH . '/settings'] = array(
    'title' => 'Twilio Settings',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items[TWILIO_ADMIN_PATH . '/test'] = array(
    'title' => 'Send Test SMS message',
    'description' => 'Test your Twilio SMS functionality',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'twilio_admin_test_form',
    ),
    'access arguments' => array(
      'administer twilio',
    ),
    'file' => 'twilio.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 0,
  );
  $items['twilio/sms'] = array(
    'page callback' => 'twilio_receive_message',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  $items['twilio/voice'] = array(
    'page callback' => 'twilio_receive_voice',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  return $items;
}