1<?php 2 3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */ 4 5/** 6 * Show glossary terms 7 * 8 * @author Stefan Meyer <meyer@leifos.com> 9 */ 10class ilObjGlossarySubItemListGUI extends ilSubItemListGUI 11{ 12 /** 13 * @var ilObjUser 14 */ 15 protected $user; 16 17 18 /** 19 * Constructor 20 */ 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 29 /** 30 * get html 31 * @return 32 */ 33 public function getHTML() 34 { 35 $lng = $this->lng; 36 $ilUser = $this->user; 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} 79