You are here

function messaging_sms_messaging in Messaging 6.4

Same name and namespace in other branches
  1. 5 messaging_sms/messaging_sms.module \messaging_sms_messaging()
  2. 6 messaging_sms/messaging_sms.module \messaging_sms_messaging()
  3. 6.2 messaging_sms/messaging_sms.module \messaging_sms_messaging()
  4. 6.3 messaging_sms/messaging_sms.module \messaging_sms_messaging()

Implementation of hook_messaging

File

messaging_sms/messaging_sms.module, line 10
SMS Messsaging using SMS Framework. Messaging method plug-in

Code

function messaging_sms_messaging($op = 'info') {
  switch ($op) {
    case 'send methods':
      $info['sms'] = array(
        'title' => 'SMS Framework',
        'name' => t('SMS'),
        'description' => t('Send SMS using SMS Framework.'),
        'group' => 'sms',
        // Class of send method
        'type' => MESSAGING_TYPE_SEND,
        'address_type' => 'mobile',
        // Which kind of address this method uses
        'glue' => ' ',
        'render callback' => 'messaging_sms_render',
        'send callback' => 'messaging_sms_send_msg',
        'destination callback' => 'messaging_sms_user_destination',
        'anonymous' => TRUE,
        // Allow anonymous destinations
        'filter' => 'messaging_plaintext',
      );
      return $info;
    case 'address types':
      $types['mobile'] = array(
        'name' => t('Mobile phone number'),
        'uid2address callback' => 'messaging_sms_user_destination',
      );
  }
}