ILIAS  release_8 Revision v8.24
class.ilObjWikiSearchResultTableGUI.php
Go to the documentation of this file.
1<?php
2
25{
26 public function parse(): void
27 {
28 $ilCtrl = $this->ctrl;
29
30 $rows = array();
31 foreach ($this->getResults()->getResults() as $result_set) {
32 $row = array();
33 $row['title'] = ilWikiPage::lookupTitle($result_set['item_id']);
34
35 if (!is_null($row['title'])) {
36 $ilCtrl->setParameterByClass(
37 'ilwikipagegui',
38 'page',
39 ilWikiUtil::makeUrlTitle($row['title'])
40 );
41 $row['link'] = $ilCtrl->getLinkTargetByClass('ilwikipagegui', 'preview');
42
43 $row['relevance'] = (float) ($result_set['relevance'] ?? 0);
44 $row['content'] = $result_set['content'] ?? "";
45
46 $rows[] = $row;
47 }
48 }
49
50 $this->setData($rows);
51 }
52
53 protected function fillRow(array $a_set): void
54 {
55 $this->tpl->setVariable('HREF_ITEM', $a_set['link']);
56 $this->tpl->setVariable('TXT_ITEM_TITLE', $a_set['title']);
57
58 if ($this->getSettings()->enabledLucene()) {
59 $this->tpl->setVariable('RELEVANCE', $this->getRelevanceHTML($a_set['relevance']));
60 }
61
62 if ($a_set['content'] !== '') {
63 $this->tpl->setVariable('HIGHLIGHT_CONTENT', $a_set['content']);
64 }
65 }
66}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
fillRow(array $a_set)
Standard Version of Fill Row.
setData(array $a_data)
Set table data.
static lookupTitle(int $a_page_id)
static makeUrlTitle(string $a_par)
$rows
Definition: xhr_table.php:10