function Notifications_Event::add_object in Notifications 6.4
Same name and namespace in other branches
- 7 notifications.event.inc \Notifications_Event::add_object()
Add event object
Parameters
$type: Object type: 'user', 'node', etc...
$object: Full object or key field value. I.e. it may be nid, uid
1 call to Notifications_Event::add_object()
- Notifications_Event::object in includes/
notifications_event.class.inc - Get set event object
File
- includes/
notifications_event.class.inc, line 189 - Drupal Notifications Framework - Default class file
Class
- Notifications_Event
- Message destination class
Code
function add_object($type, $object) {
$key = notifications_object_type($type, 'key_field');
$value = is_object($object) ? $object->{$key} : $object;
$this->params['objects'][$type] = $value;
if (is_object($object)) {
$this
->set_object($type, $object);
}
}