function notifications_feed_messaging in Notifications 6
Same name and namespace in other branches
- 5 notifications_feed/notifications_feed.module \notifications_feed_messaging()
Implementation of hook_messaging()
File
- notifications_feed/
notifications_feed.module, line 146 - Subscriptions to FeedAPI feeds
Code
function notifications_feed_messaging($op, $type = NULL, $arg2 = NULL, $arg3 = NULL, $arg4 = NULL) {
switch ($op) {
case 'message groups':
// Generic notifications event
$info['notifications-event-feed'] = array(
'module' => 'notifications_content',
'name' => t('Notifications for feed events'),
'fallback' => 'notifications-event',
);
return $info;
case 'message keys':
switch ($type) {
case 'notifications-event-feed':
// Some parts will be re-used from 'notifications-event' group
// So we specify only subject and main message
return array(
'subject' => t('Subject'),
'main' => t('Content'),
'digest' => t('Digest line'),
);
break;
}
break;
case 'messages':
// Event notifications
switch ($type) {
case 'notifications-event-feed':
return array(
'subject' => t('Feed updated: [title]'),
'main' => array(
t('Some feed items have been updated:'),
'[feed-items-refresh]',
t('Read more [feed-url]'),
),
'digest' => t('New content for feed [feed-name]. Read more [feed-url]'),
);
}
break;
case 'tokens':
if ($type == 'notifications-event-feed') {
return array(
'feed',
);
}
break;
}
}