class Messaging_User_Destination in Messaging 7
Destination is a system user
Hierarchy
- class \Messaging_Object
- class \Messaging_Destination
- class \Messaging_User_Destination
- class \Messaging_Destination
Expanded class hierarchy of Messaging_User_Destination
1 string reference to 'Messaging_User_Destination'
- messaging_messaging in ./
messaging.module - Implements hook_messaging().
File
- ./
messaging.destination.inc, line 425 - Drupal Messaging Framework - Default class file
View source
class Messaging_User_Destination extends Messaging_Destination {
public $type = 'user';
public $address = '';
/**
* Get name for display
*/
function address_name() {
return t('User');
}
/**
* Get address for sending
*/
function get_address() {
return $this
->get_user();
}
/**
* Set user for this destination
*/
function set_user($user) {
$this->uid = $user->uid;
}
/**
* Get unique index for this destination
*/
function index() {
return 'user:' . $this->uid;
}
/**
* Get user from address
*/
public static function get_user_from_address($address) {
return $address;
}
/**
* Get address from user
*/
public static function get_address_from_user($user) {
return $user;
}
/**
* Check address is valid
*/
public static function validate_address($address, $type = NULL) {
return is_object($address) ? !empty($address->uid) : FALSE;
}
/**
* Format address
*/
public static function format_address($user, $format = MESSAGING_FORMAT_PLAIN, $type = NULL) {
return $format & MESSAGING_FORMAT_HTML ? theme('username', array(
'account' => $user,
)) : check_plain($user->name);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Messaging_Destination:: |
public | property | ||
Messaging_Destination:: |
public | property | ||
Messaging_Destination:: |
public | property | ||
Messaging_Destination:: |
public | property | ||
Messaging_Destination:: |
public | property | ||
Messaging_Destination:: |
function | Get address type information | ||
Messaging_Destination:: |
public static | function | Build destination object | |
Messaging_Destination:: |
public static | function | Build from address | |
Messaging_Destination:: |
public static | function | Build from method, address, user | |
Messaging_Destination:: |
public static | function |
Build destination from db object Overrides Messaging_Object:: |
|
Messaging_Destination:: |
public static | function | Build from address type | |
Messaging_Destination:: |
public static | function | Build from user account | |
Messaging_Destination:: |
public static | function | Cache get/set by method and address | |
Messaging_Destination:: |
public | function | Save object to cache | |
Messaging_Destination:: |
public static | function | ||
Messaging_Destination:: |
public | function | Save object to cache | |
Messaging_Destination:: |
public static | function | ||
Messaging_Destination:: |
public static | function | Create from array data | |
Messaging_Destination:: |
public static | function | Create for sending method | |
Messaging_Destination:: |
public static | function | Create with parameters | |
Messaging_Destination:: |
public static | function | Delete messaging destination object/s | |
Messaging_Destination:: |
function | Format destination | ||
Messaging_Destination:: |
public static | function | Get from db using conditions | |
Messaging_Destination:: |
public static | function | Get destination by method and address. This allows advanced caching. | |
Messaging_Destination:: |
function | Get address name (will be user name if available) | ||
Messaging_Destination:: |
function | Get address type name for display | ||
Messaging_Destination:: |
function | Get user account | ||
Messaging_Destination:: |
protected | function | Run module_invoke_all('notifications_subscription') with this object | |
Messaging_Destination:: |
public static | function | Load object from database | |
Messaging_Destination:: |
public static | function | Load multiple events | |
Messaging_Destination:: |
protected static | function | Invoke static method on address type. | |
Messaging_Destination:: |
constant | |||
Messaging_Destination:: |
constant | |||
Messaging_Destination:: |
public static | function | Validate values to create a destination | |
Messaging_Destination:: |
public static | function | Validate values to create a destination | |
Messaging_Destination:: |
public | function | ||
Messaging_Object:: |
public | function | Constructor | |
Messaging_User_Destination:: |
public | property |
Overrides Messaging_Destination:: |
|
Messaging_User_Destination:: |
public | property |
Overrides Messaging_Destination:: |
|
Messaging_User_Destination:: |
function | Get name for display | ||
Messaging_User_Destination:: |
public static | function |
Format address Overrides Messaging_Destination:: |
|
Messaging_User_Destination:: |
function |
Get address for sending Overrides Messaging_Destination:: |
||
Messaging_User_Destination:: |
public static | function |
Get address from user Overrides Messaging_Destination:: |
|
Messaging_User_Destination:: |
public static | function |
Get user from address Overrides Messaging_Destination:: |
|
Messaging_User_Destination:: |
function |
Get unique index for this destination Overrides Messaging_Destination:: |
||
Messaging_User_Destination:: |
function |
Set user for this destination Overrides Messaging_Destination:: |
||
Messaging_User_Destination:: |
public static | function |
Check address is valid Overrides Messaging_Destination:: |