ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilObjGlossarySubItemListGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11{
15 protected $user;
16
17
21 public function __construct($a_cmd_class)
22 {
23 global $DIC;
24
25 parent::__construct($a_cmd_class);
26 $this->user = $DIC->user();
27 }
28
33 public function getHTML()
34 {
37
38 $lng->loadLanguageModule('content');
39 foreach ($this->getSubItemIds(true) as $sub_item) {
40 if (is_object($this->getHighlighter()) and strlen($this->getHighlighter()->getContent($this->getObjId(), $sub_item))) {
41 $this->tpl->setCurrentBlock('sea_fragment');
42 $this->tpl->setVariable('TXT_FRAGMENT', $this->getHighlighter()->getContent($this->getObjId(), $sub_item));
43 $this->tpl->parseCurrentBlock();
44 }
45 $this->tpl->setCurrentBlock('subitem');
46 $this->tpl->setVariable('SUBITEM_TYPE', $lng->txt('cont_term'));
47 $this->tpl->setVariable('SEPERATOR', ':');
48
49 #$this->getItemListGUI()->setChildId($sub_item);
50
51 $src_string = ilUserSearchCache::_getInstance($ilUser->getId())->getUrlEncodedQuery();
52
53 $this->tpl->setVariable('LINK', ilLink::_getLink(
54 $this->getRefId(),
55 'git',
56 array(
57 'target' => 'git_' . $sub_item . '_' . $this->getRefId(),
58 'srcstring' => 1
59 )
60 ));
61
62 $this->tpl->setVariable('TARGET', $this->getItemListGUI()->getCommandFrame(''));
63 $this->tpl->setVariable('TITLE', ilGlossaryTerm::_lookGlossaryTerm($sub_item));
64
65 // begin-patch mime_filter
66 if (count($this->getSubItemIds(true)) > 1) {
67 $this->parseRelevance($sub_item);
68 }
69 // end-patch mime_filter
70
71 $this->tpl->parseCurrentBlock();
72 }
73
74 $this->showDetailsLink();
75
76 return $this->tpl->get();
77 }
78}
user()
Definition: user.php:4
An exception for terminatinating execution or to throw for unit testing.
static _lookGlossaryTerm($term_id)
get glossary term
Base class for all sub item list gui's.
getItemListGUI()
get item list gui
getSubItemIds($a_limited=false)
get sub item ids
showDetailsLink()
show details link
getHighlighter()
get highlighter
static _getInstance($a_usr_id)
Get singleton instance.
global $DIC
Definition: goto.php:24
$ilUser
Definition: imgupload.php:18
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc