ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilObjForumSearchResultTableGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
8 {
12  public function parse()
13  {
14  global $DIC;
15 
16  $valid_threads = ilForum::_getThreads($DIC['ilObjDataCache']->lookupObjId($this->ref_id));
17 
18  $rows = array();
19  foreach ($this->getResults()->getResults() as $result_set) {
20  if (!array_key_exists($result_set['item_id'], $valid_threads)) {
21  continue;
22  }
23 
24  $row = array();
25 
26  $row['title'] = $valid_threads[$result_set['item_id']];
27 
28  $DIC->ctrl()->setParameterByClass('ilObjForumGUI', 'thr_pk', $result_set['item_id']);
29  $row['link'] = $DIC->ctrl()->getLinkTargetByClass('ilObjForumGUI', 'viewThread');
30 
31  $row['relevance'] = $result_set['relevance'];
32  $row['content'] = $result_set['content'];
33 
34  $rows[] = $row;
35  }
36 
37  $this->setData($rows);
38  }
39 
44  public function fillRow($a_set)
45  {
46  $this->tpl->setVariable('HREF_ITEM', $a_set['link']);
47  $this->tpl->setVariable('TXT_ITEM_TITLE', $a_set['title']);
48 
49  if ($this->getSettings()->enabledLucene()) {
50  $this->tpl->setVariable('RELEVANCE', $this->getRelevanceHTML($a_set['relevance']));
51  }
52  if (strlen($a_set['content'])) {
53  $this->tpl->setVariable('HIGHLIGHT_CONTENT', $a_set['content']);
54  }
55  }
56 }
global $DIC
Definition: saml.php:7
static _getThreads($a_obj_id, $a_sort_mode=self::SORT_DATE)
Get thread infos of object.
$row
$rows
Definition: xhr_table.php:10
Class ilObjForumSearchResultTableGUI.