You are here

function notifications_subscription_list in Notifications 7

Build a subscriptions list collection with this name

A new Notifications_Subscription_List will be created if not cached before, and we'll invoke hook_notifications_subscription_list($name, $list) to collect subscriptions for this list.

File

./notifications.module, line 572
Notifications module

Code

function notifications_subscription_list($name) {
  $types =& drupal_static(__FUNCTION__);
  if (!isset($types[$name])) {
    $list = new Notifications_Subscription_List($name);

    // Modules can add or remove subscriptions from the list
    module_invoke_all('notifications_subscription_list', $name, $list);
    $types[$name] = $list;
  }
  return clone $types[$name];
}