Пример #1
0
 /**
  * Generates the HTML for a question prompt
  *
  * @param  QuestionModel question the prompt is for
  * @return string
  */
 public function questionPrompt(QuestionModel $q)
 {
     $b = new Tag_Builder();
     $qNum = $this->view->h($q->questionNumber);
     if ($qNum === null || $qNum === '' || $qNum === '0') {
         $qNum = '';
     } else {
         $qNum = "({$qNum})  ";
     }
     return $b->label(array('for' => "q{$q->questionID}", 'class' => 'outer'), $b->em($qNum), $b->strong($this->view->h($q->qText)), $this->referenceString($q));
 }