ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjLearningModuleSubItemListGUI Class Reference
+ Inheritance diagram for ilObjLearningModuleSubItemListGUI:
+ Collaboration diagram for ilObjLearningModuleSubItemListGUI:

Public Member Functions

 __construct ($a_cmd_class)
 Constructor. More...
 
 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 ()
 

Protected Attributes

 $user
 
- Protected Attributes inherited from ilSubItemListGUI
 $ctrl
 
 $lng
 
 $cmdClass = null
 
 $tpl
 

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)
 
- Static Protected Attributes inherited from ilSubItemListGUI
static $MAX_SUBITEMS = 5
 

Detailed Description

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

Definition at line 34 of file class.ilObjLearningModuleSubItemListGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjLearningModuleSubItemListGUI::__construct (   $a_cmd_class)

Constructor.

Reimplemented from ilSubItemListGUI.

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

46 {
47 global $DIC;
48 parent::__construct($a_cmd_class);
49
50 $this->user = $DIC->user();
51 }
user()
Definition: user.php:4
global $DIC
Definition: saml.php:7

References $DIC, and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ getHTML()

ilObjLearningModuleSubItemListGUI::getHTML ( )

get html

Returns

Reimplemented from ilSubItemListGUI.

Definition at line 58 of file class.ilObjLearningModuleSubItemListGUI.php.

59 {
62
63 include_once 'Modules/LearningModule/classes/class.ilLMObject.php';
64 foreach ($this->getSubItemIds(true) as $sub_item) {
65 if (is_object($this->getHighlighter()) and strlen($this->getHighlighter()->getContent($this->getObjId(), $sub_item))) {
66 $this->tpl->setCurrentBlock('sea_fragment');
67 $this->tpl->setVariable('TXT_FRAGMENT', $this->getHighlighter()->getContent($this->getObjId(), $sub_item));
68 $this->tpl->parseCurrentBlock();
69 }
70 $this->tpl->setCurrentBlock('subitem');
71
72 $this->tpl->setVariable('SEPERATOR', ':');
73
74
75 switch (ilLMObject::_lookupType($sub_item, $this->getObjId())) {
76 case 'pg':
77 $this->getItemListGUI()->setChildId($sub_item);
78 $this->tpl->setVariable("SUBITEM_TYPE", $lng->txt('obj_pg'));
79 $link = $this->getItemListGUI()->getCommandLink('page');
80 include_once './Services/Search/classes/class.ilUserSearchCache.php';
81 $link .= ('&srcstring=1');
82 $this->tpl->setVariable('LINK', $link);
83 $this->tpl->setVariable('TARGET', $this->getItemListGUI()->getCommandFrame('page'));
84 $this->tpl->setVariable('TITLE', ilLMObject::_lookupTitle($sub_item));
85 break;
86
87 case 'st':
88
89 $this->getItemListGUI()->setChildId($sub_item);
90 $this->tpl->setVariable("SUBITEM_TYPE", $lng->txt('obj_st'));
91 $link = $this->getItemListGUI()->getCommandLink('page');
92 include_once './Services/Search/classes/class.ilUserSearchCache.php';
93 $link .= ('&srcstring=1');
94 $this->tpl->setVariable('LINK', $link);
95 $this->tpl->setVariable('TARGET', $this->getItemListGUI()->getCommandFrame('page'));
96 $this->tpl->setVariable('TITLE', ilLMObject::_lookupTitle($sub_item));
97 break;
98
99 default:
100
101 if (ilObject::_lookupType($sub_item) != 'file') {
102 return '';
103 }
104
105 $this->getItemListGUI()->setChildId('il__file_' . $sub_item);
106 $this->tpl->setVariable('SUBITEM_TYPE', $lng->txt('obj_file'));
107 $link = $this->getItemListGUI()->getCommandLink('downloadFile');
108 $this->tpl->setVariable('LINK', $link);
109 $this->tpl->setVariable('TITLE', ilObject::_lookupTitle($sub_item));
110 break;
111 }
112
113 if (count($this->getSubItemIds(true)) > 1) {
114 $this->parseRelevance($sub_item);
115 }
116
117 $this->tpl->parseCurrentBlock();
118 }
119
120 $this->showDetailsLink();
121
122 return $this->tpl->get();
123 }
static _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.
static _lookupTitle($a_obj_id)
Lookup title.
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
getItemListGUI()
get item list gui
getSubItemIds($a_limited=false)
get sub item ids
showDetailsLink()
show details link
getHighlighter()
get highlighter
$ilUser
Definition: imgupload.php:18

References $ilUser, ilSubItemListGUI\$lng, $user, ilObject\_lookupTitle(), ilLMObject\_lookupTitle(), ilObject\_lookupType(), ilLMObject\_lookupType(), ilSubItemListGUI\getHighlighter(), ilSubItemListGUI\getItemListGUI(), ilSubItemListGUI\getObjId(), ilSubItemListGUI\getSubItemIds(), ilSubItemListGUI\parseRelevance(), and ilSubItemListGUI\showDetailsLink().

+ Here is the call graph for this function:

Field Documentation

◆ $user

ilObjLearningModuleSubItemListGUI::$user
protected

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

Referenced by getHTML().


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