コード例 #1
0
ファイル: SM_QueryHandler.php プロジェクト: Tjorriemorrie/app
 /**
  * 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->titleLinkSeparate && $this->linkAbsolute) {
             $text = Html::element('a', array('href' => $object->getTitle()->getFullUrl()), $object->getTitle()->getText());
         } 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);
 }