public function actionAnswersWidget($voteID, $showControls = true) { $vote = Quiz::find()->andWhere(['id' => $voteID])->one(); if (empty($vote)) { throw new NotFoundHttpException("Голосование с ID {$voteID} не найдено!"); } return $this->renderPartial('answers-widget', ['quiz' => $vote, 'showControls' => $showControls]); }
public function save() { return $this->quiz->vote($this->answerID); }