示例#1
0
 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]);
 }
示例#2
0
 public function save()
 {
     return $this->quiz->vote($this->answerID);
 }