public function actionEditAjax() { $calendarEntry = $this->getCalendarEntry(Yii::$app->request->get('id')); if ($calendarEntry == null) { throw new HttpException('404', Yii::t('CalendarModule.base', "Event not found!")); } if (!$calendarEntry->content->canEdit()) { throw new HttpException('403', Yii::t('CalendarModule.base', "You don't have permission to edit this event!")); } if (Yii::$app->request->get('fullCalendar') == 1) { \humhub\modules\calendar\widgets\FullCalendar::populate($calendarEntry); } if ($calendarEntry->validate() && $calendarEntry->save()) { return; } throw new HttpException("Could not save!" . print_r($calendarEntry->getErrors(), 1)); }