class Messaging_Simple_Method in Messaging 7
Web sending method
Hierarchy
- class \Messaging_Simple_Method extends \Messaging_Send_Method
Expanded class hierarchy of Messaging_Simple_Method
1 string reference to 'Messaging_Simple_Method'
- messaging_simple_messaging in messaging_simple/
messaging_simple.module - Implementation of hook_messaging
File
- messaging_simple/
messaging_simple.inc, line 74 - Drupal Messaging Framework - Send_Method class file
View source
class Messaging_Simple_Method extends Messaging_Send_Method {
// Default group and address type
public $method = 'simple';
public $type = 'web';
public $anonymous = FALSE;
public $format = MESSAGING_FORMAT_HTML;
/**
* Get address type
*/
public static function address_type() {
return 'user';
}
/**
* It doesn't support anonymous destinations
*/
function supports_anonymous() {
return FALSE;
}
/**
* Send message to address, use sending callback
*/
function send_address($user, $message) {
return $this
->send_user($user, $message);
}
/**
* Send to user. Just store the message to be shown later.
*/
function send_user($user, $message) {
$user = messaging_user_object($user);
$simple = Messaging_Simple::build($user, $message);
return (bool) $simple
->save();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Messaging_Simple_Method:: |
public | property | ||
Messaging_Simple_Method:: |
public | property | ||
Messaging_Simple_Method:: |
public | property | ||
Messaging_Simple_Method:: |
public | property | ||
Messaging_Simple_Method:: |
public static | function | Get address type | |
Messaging_Simple_Method:: |
function | Send message to address, use sending callback | ||
Messaging_Simple_Method:: |
function | Send to user. Just store the message to be shown later. | ||
Messaging_Simple_Method:: |
function | It doesn't support anonymous destinations |