ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjGlossarySubItemListGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilObjGlossarySubItemListGUI:
+ Collaboration diagram for ilObjGlossarySubItemListGUI:

Public Member Functions

 __construct (string $a_cmd_class)
 
 getHTML ()
 
- Public Member Functions inherited from ilSubItemListGUI
 __construct (string $cmd_class)
 
 getCmdClass ()
 
 setHighlighter (?ilLuceneHighlighterResultParser $highlighter)
 
 getHighlighter ()
 
 getRefId ()
 
 getObjId ()
 
 getType ()
 
 getSubItemIds (bool $limited=false)
 
 getItemListGUI ()
 
 init (ilObjectListGUI $item_list_gui, int $ref_id, array $subitem_ids)
 
 getHTML ()
 

Protected Attributes

ilObjUser $user
 
- Protected Attributes inherited from ilSubItemListGUI
ilCtrlInterface $ctrl
 
ilLanguage $lng
 
string $cmd_class = ''
 
ilTemplate $tpl = null
 
ilLuceneHighlighterResultParser $highlighter = null
 
array $subitem_ids = []
 
ilObjectListGUI $item_list_gui = null
 
int $ref_id = 0
 
int $obj_id = 0
 
string $type = ''
 

Additional Inherited Members

- Static Public Member Functions inherited from ilSubItemListGUI
static setShowDetails (int $obj_id)
 set show details. More...
 
static resetDetails ()
 As long as static::resetDetails is not possible this method is final. More...
 
static enabledDetails (int $obj_id)
 As long as static::enableDetails is not possible this method is final. More...
 
- Protected Member Functions inherited from ilSubItemListGUI
 showDetailsLink ()
 
 parseRelevance (int $sub_item)
 
- Static Protected Attributes inherited from ilSubItemListGUI
static int $MAX_SUBITEMS = 5
 
static array $details = []
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Show glossary terms

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 24 of file class.ilObjGlossarySubItemListGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjGlossarySubItemListGUI::__construct ( string  $a_cmd_class)

Definition at line 28 of file class.ilObjGlossarySubItemListGUI.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Repository\user().

29  {
30  global $DIC;
31 
32  parent::__construct($a_cmd_class);
33  $this->user = $DIC->user();
34  }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getHTML()

ilObjGlossarySubItemListGUI::getHTML ( )

Definition at line 36 of file class.ilObjGlossarySubItemListGUI.php.

References $ilUser, ilSubItemListGUI\$lng, $user, ilUserSearchCache\_getInstance(), ilLink\_getLink(), ilGlossaryTerm\_lookGlossaryTerm(), ILIAS\UI\Implementation\Component\Input\ViewControl\getContent(), ilSubItemListGUI\getHighlighter(), ilSubItemListGUI\getItemListGUI(), ilSubItemListGUI\getObjId(), ilSubItemListGUI\getRefId(), ilSubItemListGUI\getSubItemIds(), ilLanguage\loadLanguageModule(), ilSubItemListGUI\parseRelevance(), ilSubItemListGUI\showDetailsLink(), and ilLanguage\txt().

36  : string
37  {
38  $lng = $this->lng;
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 
66  // begin-patch mime_filter
67  if (count($this->getSubItemIds(true)) > 1) {
68  $this->parseRelevance($sub_item);
69  }
70  // end-patch mime_filter
71 
72  $this->tpl->parseCurrentBlock();
73  }
74 
75  $this->showDetailsLink();
76 
77  return $this->tpl->get();
78  }
getSubItemIds(bool $limited=false)
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...
parseRelevance(int $sub_item)
static _getInstance(int $a_usr_id)
loadLanguageModule(string $a_module)
Load language module.
static _lookGlossaryTerm(int $term_id)
get glossary term
$ilUser
Definition: imgupload.php:34
+ Here is the call graph for this function:

Field Documentation

◆ $user

ilObjUser ilObjGlossarySubItemListGUI::$user
protected

Definition at line 26 of file class.ilObjGlossarySubItemListGUI.php.

Referenced by getHTML().


The documentation for this class was generated from the following file: