status = 'complete'; return $calendar_event->save(); } catch (Exception $e) { throw new WorkflowActionNotPerformedException(); } } /** * Perform the verify action. * * @param CalendarEvent $calendar_event * * @return CalendarEvent */public function verify(CalendarEvent $calendar_event) { try { $calendar_event->status = 'verify'; return $calendar_event->save(); } catch (Exception $e) { throw new WorkflowActionNotPerformedException(); } } /** * Perform the approve action. * * @param CalendarEvent $calendar_event * * @return CalendarEvent */public function approve(CalendarEvent $calendar_event) { try { $calendar_event->status = 'approve'; return $calendar_event->save(); } catch (Exception $e) { throw new WorkflowActionNotPerformedException(); } } /** * Perform the publish action. * * @param CalendarEvent $calendar_event * * @return CalendarEvent */public function publish(CalendarEvent $calendar_event) { try { $calendar_event->status = 'publish'; return $calendar_event->save(); } catch (Exception $e) { throw new WorkflowActionNotPerformedException(); } } /** * Perform the archive action. * * @param CalendarEvent $calendar_event * * @return CalendarEvent */ public function archive(CalendarEvent $calendar_event) { try { $calendar_event->status = 'archive'; return $calendar_event->save(); } catch (Exception $e) { throw new WorkflowActionNotPerformedException(); } } /** * Perform the unpublish action. * * @param CalendarEvent $calendar_event * * @return CalendarEvent */ public function unpublish(CalendarEvent $calendar_event) { try { $calendar_event->status = 'unpublish'; return $calendar_event->save(); } catch (Exception $e) { throw new WorkflowActionNotPerformedException(); } } }