/** * Handles a SMWWikiPageValue subject value. * Gets the plain text title and creates the HTML text with headers and the like. * * @since 1.0 * * @param SMWWikiPageValue $object * * @return array with title and text */ protected function handleResultSubject(SMWWikiPageValue $object) { $title = $object->getLongText($this->outputmode, null); $text = ''; if ($this->showSubject) { if (!$this->showArticleLink()) { $text = $this->hideNamespace ? $object->getText() : $object->getTitle()->getFullText(); } else { if (!$this->titleLinkSeparate && $this->linkAbsolute) { $text = Html::element('a', array('href' => $object->getTitle()->getFullUrl()), $this->hideNamespace ? $object->getText() : $object->getTitle()->getFullText()); } else { if ($this->hideNamespace) { $text = $object->getShortHTMLText(smwfGetLinker()); } else { $text = $object->getLongHTMLText(smwfGetLinker()); } } } if ($this->boldSubject) { $text = '<b>' . $text . '</b>'; } if ($this->titleLinkSeparate) { $txt = $object->getTitle()->getText(); if ($this->pageLinkText !== '') { $txt = str_replace('$1', $txt, $this->pageLinkText); } $text .= Html::element('a', array('href' => $object->getTitle()->getFullUrl()), $txt); } } return array($title, $text); }