/** * Save multiple reminders data from clients Meetings/Calls EditView. * Call this static function in save action. * * @param string $eventModule Event Bean module name (e.g. Meetings, Calls) * @param string $eventModuleId Event Bean GUID * @param string $remindersDataJson Remainders data as Json string from POST data. * @throws Exception throw an Exception if json format is invalid. */ public static function saveRemindersDataJson($eventModule, $eventModuleId, $remindersDataJson) { $reminderData = json_decode($remindersDataJson); if (!json_last_error()) { Reminder::saveRemindersData($eventModule, $eventModuleId, $reminderData); } else { throw new Exception(json_last_error_msg()); } }