Пример #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);
 }