You are here

function Notifications_Subscription::create_destination in Notifications 7

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

Create destination for this subscription

File

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

Class

Notifications_Subscription
Common base for subscription type and subscription instance

Code

function create_destination($method = NULL, $address = NULL) {
  $account = $this
    ->get_user();
  if (Messaging_Destination::validate_method($method, $address, $account)) {
    $destination = Messaging_Destination::build_method($method, $address, $account);
    $this
      ->set_destination($destination);
  }
}