ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjGlossarySubItemListGUI.php
Go to the documentation of this file.
1<?php
2
25{
26 protected ilObjUser $user;
27
28 public function __construct(string $a_cmd_class)
29 {
30 global $DIC;
31
32 parent::__construct($a_cmd_class);
33 $this->user = $DIC->user();
34 }
35
36 public function getHTML(): string
37 {
39 $ilUser = $this->user;
40
41 $lng->loadLanguageModule('content');
42 foreach ($this->getSubItemIds(true) as $sub_item) {
43 if (is_object($this->getHighlighter()) && $this->getHighlighter()->getContent($this->getObjId(), $sub_item) !== '') {
44 $this->tpl->setCurrentBlock('sea_fragment');
45 $this->tpl->setVariable('TXT_FRAGMENT', $this->getHighlighter()->getContent($this->getObjId(), $sub_item));
46 $this->tpl->parseCurrentBlock();
47 }
48 $this->tpl->setCurrentBlock('subitem');
49 $this->tpl->setVariable('SUBITEM_TYPE', $lng->txt('cont_term'));
50 $this->tpl->setVariable('SEPERATOR', ':');
51
52 $src_string = ilUserSearchCache::_getInstance($ilUser->getId())->getUrlEncodedQuery();
53
54 $this->tpl->setVariable('LINK', ilLink::_getLink(
55 $this->getRefId(),
56 'git',
57 array(
58 'target' => 'git_' . $sub_item . '_' . $this->getRefId(),
59 'srcstring' => 1
60 )
61 ));
62
63 $this->tpl->setVariable('TARGET', $this->getItemListGUI()->getCommandFrame(''));
64 $this->tpl->setVariable('TITLE', ilGlossaryTerm::_lookGlossaryTerm($sub_item));
65 $this->tpl->parseCurrentBlock();
66 }
67
68 $this->showDetailsLink();
69
70 return $this->tpl->get();
71 }
72}
static _lookGlossaryTerm(int $term_id)
get glossary term
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
User class.
Base class for all sub item list gui's.
getSubItemIds(bool $limited=false)
static _getInstance(int $a_usr_id)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26