You are here

function notifications_build_subscription in Notifications 6.4

Build subscription object properly

Parameters

$subscription: Subscription object, or array of properties or subscription type

13 calls to notifications_build_subscription()
NotificationsBasicTests::testNotificationsBasicAPI in tests/notifications_api.test
Play with creating, retrieving, deleting a pair subscriptions
NotificationsContentTests::testNotificationsContent in tests/notifications_content.test
Play with creating, retrieving, deleting a pair subscriptions
notifications_content_test_template_submit in notifications_content/notifications_content.pages.inc
Process template test
notifications_custom_fields_form in notifications_custom/notifications_custom.admin.inc
Fields form: edit /add fields to custom subscription type
notifications_object_user_subscriptions in includes/object.inc
Get list of possible and existing subscriptions for user/object

... See full list

File

./notifications.module, line 632
Notifications module

Code

function notifications_build_subscription($subscription) {
  if (is_object($subscription) && is_a($subscription, 'Notifications_Subscription')) {
    return $subscription;
  }
  else {
    return Notifications_Subscription::build($subscription);
  }
}