You are here

function Notifications_Subscription::set_destination in Notifications 6.4

Same name and namespace in other branches
  1. 7 notifications.subscription.inc \Notifications_Subscription::set_destination()

Set destination object

3 calls to Notifications_Subscription::set_destination()
Notifications_Subscription::set_properties in includes/notifications_subscription.class.inc
Save fields from form submission
Notifications_Subscription::validate_destination in includes/notifications_subscription.class.inc
Validate destination for this subscription
Notifications_Subscription::__set in includes/notifications_subscription.class.inc
Magic method, set protected properties

File

includes/notifications_subscription.class.inc, line 670
Drupal Notifications Framework - Default class file

Class

Notifications_Subscription
Message destination class

Code

function set_destination($destination) {
  if (empty($destination)) {
    $this->mdid = 0;
    $this->destination = '';
    $this->destination_object = FALSE;
  }
  elseif (is_object($destination)) {
    $this->uid = $destination->uid;
    $this->mdid = $destination->mdid;
    $this->destination = $destination->address;
    $this->destination_object = $destination;
  }
  elseif (is_numeric($destination)) {
    $this->mdid = $destination;
  }
}