function NotificationsTemplatesTests::notificationsCreateNodeEvent in Notifications 7
Same name and namespace in other branches
- 6.4 tests/notifications_templates.test \NotificationsTemplatesTests::notificationsCreateNodeEvent()
- 6 tests/notifications_templates.test \NotificationsTemplatesTests::notificationsCreateNodeEvent()
- 6.2 tests/notifications_templates.test \NotificationsTemplatesTests::notificationsCreateNodeEvent()
- 6.3 tests/notifications_templates.test \NotificationsTemplatesTests::notificationsCreateNodeEvent()
1 call to NotificationsTemplatesTests::notificationsCreateNodeEvent()
- NotificationsTemplatesTests::testNotificationsTemplates in tests/
notifications_templates.test - Play with creating, retrieving, deleting a pair subscriptions
File
- tests/
notifications_templates.test, line 204
Class
- NotificationsTemplatesTests
- Class for testing notifications templates and message composition.
Code
function notificationsCreateNodeEvent($action, $node) {
static $eid = 0;
$event = new Notifications_Event(array(
'type' => 'node',
'action' => $action,
'node' => $node,
'params' => array(
'nid' => $node->nid,
),
'objects' => array(
'node' => $node,
),
));
$event
->save();
return $event;
}