function Messaging_Message::send_multiple in Messaging 6.4
Send to multiple destinations, same method.
The message may need to be processed and it can be queued or discarded yet.
1 call to Messaging_Message::send_multiple()
- Messaging_Message::process in includes/
messaging_message.class.inc - Check whether the message is to be sent / queued
File
- includes/
messaging_message.class.inc, line 220 - Drupal Messaging Framework - Message class file
Class
- Messaging_Message
- Message class
Code
function send_multiple($addresses = NULL, $method = NULL) {
// Set parameters if needed, if not go with current ones
if (isset($method)) {
$this->method = $method;
}
if ($addresses) {
$this
->set_multiple($addresses);
}
else {
// Make sure it is marked as multiple destinations
$this
->set_destination(self::MULTIPLE_DESTINATION);
}
if (!$this->processed) {
return $this
->process();
}
else {
$this
->message_log('Sending to multiple destinations.', array(
'destinations' => $this->destinations,
));
$this->success = $this
->send_method()
->message_multisend($this);
return $this->success;
}
}