function oa_events_oa_messages_create_alter in Open Atrium Events 7.2
Implements hook_oa_messages_type_alter().
File
- ./
oa_events.module, line 378 - Code for the OA Events feature.
Code
function oa_events_oa_messages_create_alter($wrapper, $context) {
if ($context['message_type'] == 'oa_event_notification') {
if (isset($context['arguments']['date'])) {
if (isset($wrapper->field_oa_date)) {
// Map the next upcoming event to the messages oa_date field. This
// simplifies handling from a token perspective, as we don't need
// to determine the delta.
$wrapper->field_oa_date
->set(array(
0 => $context['arguments']['date'],
));
}
}
}
}