/** * Create the snippets content * * This is a stub function either override getHtmlOutput() or override render() * * @param \Zend_View_Abstract $view Just in case it is needed here * @return \MUtil_Html_HtmlInterface Something that can be rendered */ public function getHtmlOutput(\Zend_View_Abstract $view) { $htmlDiv = \MUtil_Html::create()->div(array('class' => 'answer-container')); if ($this->tokenId) { if ($this->token->exists) { if ($this->showHeaders) { $htmlDiv->h3(sprintf($this->_('%s answers for patient number %s'), $this->token->getSurveyName(), $this->token->getPatientNumber())); $htmlDiv->pInfo(sprintf($this->_('Answers for token %s, patient number %s: %s.'), strtoupper($this->tokenId), $this->token->getPatientNumber(), $this->token->getRespondentName()))->appendAttrib('class', 'noprint'); } $table = parent::getHtmlOutput($view); $table->setPivot(true, 2, 1); $this->applyHtmlAttributes($table); $this->class = false; $htmlDiv[] = $table; } else { $htmlDiv->ul(sprintf($this->_('Token %s not found.'), $this->tokenId), array('class' => 'errors')); } } else { $htmlDiv->ul($this->_('No token specified.'), array('class' => 'errors')); } if ($this->showButtons) { $buttonDiv = $htmlDiv->buttonDiv(); $buttonDiv->actionLink(array(), $this->_('Close'), array('onclick' => 'window.close();')); $buttonDiv->actionLink(array(), $this->_('Print'), array('onclick' => 'window.print();')); } return $htmlDiv; }
/** * Create the snippets content * * This is a stub function either override getHtmlOutput() or override render() * * @param \Zend_View_Abstract $view Just in case it is needed here * @return \MUtil_Html_HtmlInterface Something that can be rendered */ public function getHtmlOutput(\Zend_View_Abstract $view) { $seq = $this->getHtmlSequence(); $seq->h3($this->getTitle()); $table = parent::getHtmlOutput($view); $this->applyHtmlAttributes($table); $seq->append($table); return $seq; }