You are here

function notifications_custom_build_subscription in Notifications 6.4

Same name and namespace in other branches
  1. 6 notifications_custom/notifications_custom.module \notifications_custom_build_subscription()

Get subscription object from custom subscription type

Parameters

$template: Custom subscription template (object) or type (string)

4 calls to notifications_custom_build_subscription()
notifications_custom_admin_page in notifications_custom/notifications_custom.admin.inc
Page callback, administer custom subscriptions
notifications_custom_build_list in notifications_custom/notifications_custom.module
Retrieve list of custom subscription types true objects
notifications_custom_get_subscription in notifications_custom/notifications_custom.module
Get user subscription for a custom one or subscription type if not available
notifications_custom_user_multiple_subscribe in notifications_custom/notifications_custom.module
User operations callback. Bulk subscribe multiple accounts

File

notifications_custom/notifications_custom.module, line 357
Custom notifications module

Code

function notifications_custom_build_subscription($template) {
  $template = is_object($template) || is_array($template) ? $template : notifications_subscription_types($template);
  if ($template) {
    return Notifications_Custom_Subscription::build($template);
  }
  else {
    return NULL;
  }
}