ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjLinkResourceSubItemListGUI Class Reference

Show glossary terms. More...

+ Inheritance diagram for ilObjLinkResourceSubItemListGUI:
+ Collaboration diagram for ilObjLinkResourceSubItemListGUI:

Public Member Functions

 getHTML ()
 get html More...
 
- Public Member Functions inherited from ilSubItemListGUI
 __construct ($a_cmd_class)
 Constructor. More...
 
 getCmdClass ()
 get cmd class More...
 
 setHighlighter ($a_highlighter)
 set highlighter More...
 
 getHighlighter ()
 get highlighter More...
 
 getRefId ()
 get ref id More...
 
 getObjId ()
 get obj id More...
 
 getType ()
 get type More...
 
 getSubItemIds ($a_limited=false)
 get sub item ids More...
 
 getItemListGUI ()
 get item list gui More...
 
 init ($item_list_gui, $a_ref_id, $a_subitem_ids)
 init More...
 
 getHTML ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ilSubItemListGUI
static setShowDetails ($a_obj_id)
 set show details. More...
 
static resetDetails ()
 reset details As long as static::resetDetails is not possible this method is final More...
 
static enabledDetails ($a_obj_id)
 enabled show details As long as static::enableDetails is not possible this method is final More...
 
- Protected Member Functions inherited from ilSubItemListGUI
 showDetailsLink ()
 show details link More...
 
 parseRelevance ($sub_item)
 
- Protected Attributes inherited from ilSubItemListGUI
 $ctrl
 
 $lng
 
 $cmdClass = null
 
 $tpl
 
- Static Protected Attributes inherited from ilSubItemListGUI
static $MAX_SUBITEMS = 5
 

Detailed Description

Show glossary terms.

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

Definition at line 39 of file class.ilObjLinkResourceSubItemListGUI.php.

Member Function Documentation

◆ getHTML()

ilObjLinkResourceSubItemListGUI::getHTML ( )

get html

Returns

Definition at line 45 of file class.ilObjLinkResourceSubItemListGUI.php.

References ilSubItemListGUI\$lng, ilParameterAppender\_append(), ilLink\_getStaticLink(), ilSubItemListGUI\getHighlighter(), ilSubItemListGUI\getObjId(), ilSubItemListGUI\getSubItemIds(), ilLinkResourceItems\lookupItem(), ilSubItemListGUI\parseRelevance(), and ilSubItemListGUI\showDetailsLink().

46  {
47  global $lng;
48 
49  $lng->loadLanguageModule('webr');
50  foreach ($this->getSubItemIds(true) as $sub_item) {
51  if (is_object($this->getHighlighter()) and strlen($this->getHighlighter()->getContent($this->getObjId(), $sub_item))) {
52  $this->tpl->setCurrentBlock('sea_fragment');
53  $this->tpl->setVariable('TXT_FRAGMENT', $this->getHighlighter()->getContent($this->getObjId(), $sub_item));
54  $this->tpl->parseCurrentBlock();
55  }
56  $this->tpl->setCurrentBlock('subitem');
57  $this->tpl->setVariable('SUBITEM_TYPE', $lng->txt('webr'));
58  $this->tpl->setVariable('SEPERATOR', ':');
59 
60  $link_data = ilLinkResourceItems::lookupItem($this->getObjId(), $sub_item);
61  $link_data = ilParameterAppender::_append($link_data);
62 
63  // handle internal links (#10620)
64  if (stristr($link_data["target"], "|")) {
65  $parts = explode("|", $link_data["target"]);
66  if ($parts[0] == "page") {
67  $parts[0] = "pg";
68  }
69  if ($parts[0] == "term") {
70  $parts[0] = "git";
71  }
72  $link_data["target"] = ilLink::_getStaticLink($parts[1], $parts[0]);
73  }
74 
75  #$this->getItemListGUI()->setChildId($sub_item);
76  $this->tpl->setVariable('LINK', $link_data['target']);
77  $this->tpl->setVariable('TARGET', '_blank');
78  $this->tpl->setVariable('TITLE', $link_data['title']);
79 
80  // begin-patch mime_filter
81  if (count($this->getSubItemIds(true)) > 1) {
82  $this->parseRelevance($sub_item);
83  }
84  // end-patch mime_filter
85 
86  $this->tpl->parseCurrentBlock();
87  }
88 
89  $this->showDetailsLink();
90 
91  return $this->tpl->get();
92  }
getHighlighter()
get highlighter
showDetailsLink()
show details link
static _append($a_link_data)
static lookupItem($a_webr_id, $a_link_id)
getSubItemIds($a_limited=false)
get sub item ids
+ Here is the call graph for this function:

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