function notifications_object_subscribe_links in Notifications 6.4
Build subscribe / unsubscribe options for object
2 calls to notifications_object_subscribe_links()
- notifications_anonymous_subscribe_links in notifications_anonymous/
notifications_anonymous.module - Build subscription options as an array of links
- notifications_ui_subscribe_links in notifications_ui/
notifications_ui.module - Build subscription options as an array of links
File
- includes/
object.inc, line 93 - Notifications object and fields
Code
function notifications_object_subscribe_links($type, $object, $account = NULL, $subscribe_options = array(), $unsubscribe_options = array()) {
$links = array();
if ($subscriptions = notifications_object_user_subscriptions($type, $object, $account)) {
foreach ($subscriptions as $index => $subscription) {
$options = $subscription
->is_instance() ? $unsubscribe_options : $subscribe_options;
if ($link = $subscription
->build_link($options)) {
$links['notifications_' . $index] = $link;
}
}
}
return $links;
}