$rows_affected = $CI->events_model->RejectEventSubmission($keys['eventid']); if ($rows_affected == 0) { $CI->messages->AddMessage('error', 'Submission could not be rejected.'); } else { $CI->messages->AddMessage('success', 'Submission has been rejected.'); } break; default: $messages['error'][] = 'Invalid action on notification.'; break; } return $messages; } } // Register this notification type. Notifications::RegisterNotificationType(NotificationEventSubmission::$notTypeInfo['id']); /// Dummy class. class Calendar_notifications { /// Get calendar notifications for the current user. static function GetNotifications($paths) { $CI =& get_instance(); $notifications = array(); $occurrence_alerts = $CI->events_model->GetOccurrenceAlerts(); foreach ($occurrence_alerts as $occurrence) { $occurrence['link'] = $paths->OccurrenceRawInfo(0, $occurrence['event_id'], $occurrence['occurrence_id']); $notifications[] = Notifications::Create('NotificationCancelledEvent', array('userid' => $CI->events_model->GetActiveEntityId(), 'occid' => $occurrence['occurrence_id']), $occurrence); } $event_submissions = $CI->events_model->GetEventSubmissions(); foreach ($event_submissions as $event_submission) {