checkConsult($id); $course = $this->checkCourse($consult->course_id); $user = $this->getLoginUser(); $validator = new ConsultValidator(); $validator->checkOwner($user->id, $consult->user_id); $consult->delete(); $this->decrCourseConsultCount($course); } protected function decrCourseConsultCount(CourseModel $course) { $this->eventsManager->fire('courseCounter:decrConsultCount', $this, $course); } }