You are here

function notifications_content_notifications_subscription in Notifications 7

Same name and namespace in other branches
  1. 6.4 notifications_content/notifications_content.module \notifications_content_notifications_subscription()

Implementation of hook notifications_subscription()

File

notifications_content/notifications_content.module, line 596
Subscriptions to content events

Code

function notifications_content_notifications_subscription($op, $subscription = NULL) {
  switch ($op) {
    case 'page objects':
      $objects = array();

      // Return objects on current page to which we can subscribe
      if (arg(0) == 'node' && is_numeric(arg(1)) && ($node = menu_get_object('node'))) {
        $objects[] = notifications_object('node', $node);
      }
      return $objects;
      break;
  }
}