private function getHtml($webRequest, $isEmptyRequest)
 {
     if ($isEmptyRequest) {
         return HtmlContentBuilder::getPageSearchQuickForm();
     }
     if (!$this->subjectDV->isValid()) {
         foreach ($this->subjectDV->getErrors() as $error) {
             $error = Message::decode($error);
         }
         $html = Html::rawElement('div', array('class' => 'smw-callout smw-callout-error'), Message::get(array('smw-browse-invalid-subject', $error), Message::ESCAPED));
         return $html . HtmlContentBuilder::getPageSearchQuickForm();
     }
     $htmlContentBuilder = $this->newHtmlContentBuilder($webRequest);
     if ($webRequest->getVal('output') === 'legacy' || !$htmlContentBuilder->getOption('byApi')) {
         return $htmlContentBuilder->getHtml();
     }
     $options = array('dir' => $htmlContentBuilder->getOption('dir'), 'offset' => $htmlContentBuilder->getOption('offset'), 'printable' => $htmlContentBuilder->getOption('printable'), 'showInverse' => $htmlContentBuilder->getOption('showInverse'), 'showAll' => $htmlContentBuilder->getOption('showAll'));
     // Ajax/API is doing the data fetch
     $html = Html::rawElement('div', array('class' => 'smwb-container', 'data-subject' => $this->subjectDV->getDataItem()->getHash(), 'data-options' => json_encode($options)), Html::rawElement('div', array('class' => 'smwb-status'), Html::rawElement('noscript', array(), Html::rawElement('div', array('class' => 'smw-callout smw-callout-error'), Message::get('smw-browse-js-disabled', Message::PARSE)))) . Html::rawElement('div', array('class' => 'smwb-content is-disabled'), Html::rawElement('span', array('class' => 'smw-overlay-spinner large inline')) . $htmlContentBuilder->getEmptyHtml()));
     return $html;
 }
 public function testGetPageSearchQuickForm()
 {
     $this->assertInternalType('string', HtmlContentBuilder::getPageSearchQuickForm());
 }