You are here

function notifications_notifications_subscription_list in Notifications 7

Implementation of hook_notifications_subscription_list().

File

./notifications.module, line 586
Notifications module

Code

function notifications_notifications_subscription_list($name, $list = NULL) {
  switch ($name) {
    case 'page subscriptions':

      // Get all subscriptions for the objects available in the current page for the current user
      $account = $GLOBALS['user'];
      if ($objects = module_invoke_all('notifications_subscription', 'page objects')) {
        if ($add = Notifications_Subscription::object_subscriptions($objects, $account)) {
          $list
            ->add($add);
        }
        $list
          ->set_user($account);
      }
      break;
  }
}