ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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['content'] = $result_set['content'] ?? "";
44
45 $rows[] = $row;
46 }
47 }
48
49 $this->setData($rows);
50 }
51
52 protected function fillRow(array $a_set): void
53 {
54 $this->tpl->setVariable('HREF_ITEM', $a_set['link']);
55 $this->tpl->setVariable('TXT_ITEM_TITLE', $a_set['title']);
56
57 if ($a_set['content'] !== '') {
58 $this->tpl->setVariable('HIGHLIGHT_CONTENT', $a_set['content']);
59 }
60 }
61}
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, string $lang="-")
static makeUrlTitle(string $a_par)