You are here

function Notifications_Subscription::set_destination in Notifications 7

Same name and namespace in other branches
  1. 6.4 includes/notifications_subscription.class.inc \Notifications_Subscription::set_destination()

Set destination object

2 calls to Notifications_Subscription::set_destination()
Notifications_Subscription::create_destination in ./notifications.subscription.inc
Create destination for this subscription
Notifications_Subscription::set_properties in ./notifications.subscription.inc
Save fields from form submission

File

./notifications.subscription.inc, line 1341
Drupal Notifications Framework - Default class file

Class

Notifications_Subscription
Common base for subscription type and subscription instance

Code

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