ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilObjWikiSubItemListGUI Class Reference

Show wiki pages. More...

+ Inheritance diagram for ilObjWikiSubItemListGUI:
+ Collaboration diagram for ilObjWikiSubItemListGUI:

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

Show wiki pages.

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

Definition at line 38 of file class.ilObjWikiSubItemListGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjWikiSubItemListGUI::__construct (   $a_cmd_class)

Constructor.

Reimplemented from ilSubItemListGUI.

Definition at line 49 of file class.ilObjWikiSubItemListGUI.php.

50 {
51 global $DIC;
52
53 parent::__construct($a_cmd_class);
54 $this->lng = $DIC->language();
55 $this->user = $DIC->user();
56 }
user()
Definition: user.php:4
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getHTML()

ilObjWikiSubItemListGUI::getHTML ( )

get html

Returns

Reimplemented from ilSubItemListGUI.

Definition at line 62 of file class.ilObjWikiSubItemListGUI.php.

63 {
66
67 $lng->loadLanguageModule('content');
68 foreach ($this->getSubItemIds(true) as $sub_item) {
69 if (is_object($this->getHighlighter()) and strlen($this->getHighlighter()->getContent($this->getObjId(), $sub_item))) {
70 $this->tpl->setCurrentBlock('sea_fragment');
71 $this->tpl->setVariable('TXT_FRAGMENT', $this->getHighlighter()->getContent($this->getObjId(), $sub_item));
72 $this->tpl->parseCurrentBlock();
73 }
74
75 $this->tpl->setCurrentBlock('subitem');
76
77 // TODO: subitem type must returned from lucene
78 if (($title = ilWikiPage::lookupTitle($sub_item)) !== false) {
79 // Page
80 $this->tpl->setVariable('SUBITEM_TYPE', $lng->txt('obj_pg'));
81 $this->tpl->setVariable('SEPERATOR', ':');
82
83 include_once './Services/Search/classes/class.ilUserSearchCache.php';
84 $link = '&srcstring=1';
85 $link = ilObjWikiGUI::getGotoLink($this->getRefId(), $title) . $link;
86
87 $this->tpl->setVariable('LINK', $link);
88 $this->tpl->setVariable('TARGET', $this->getItemListGUI()->getCommandFrame(''));
89 $this->tpl->setVariable('TITLE', $title);
90 $this->tpl->parseCurrentBlock();
91 } else {
92 $this->tpl->setVariable('SUBITEM_TYPE', $lng->txt('obj_file'));
93 $this->tpl->setVariable('SEPERATOR', ':');
94
95 // File
96 $this->getItemListGUI()->setChildId('il__file_' . $sub_item);
97 $link = $this->getItemListGUI()->getCommandLink('downloadFile');
98 $this->tpl->setVariable('LINK', $link);
99 $this->tpl->setVariable('TITLE', ilObject::_lookupTitle($sub_item));
100 $this->tpl->parseCurrentBlock();
101 }
102
103 if (count($this->getSubItemIds(true)) > 1) {
104 $this->parseRelevance($sub_item);
105 }
106
107 $this->tpl->parseCurrentBlock();
108 }
109
110 $this->showDetailsLink();
111
112 return $this->tpl->get();
113 }
static getGotoLink($a_ref_id, $a_page="")
Get goto link.
static _lookupTitle($a_id)
lookup object title
getItemListGUI()
get item list gui
getSubItemIds($a_limited=false)
get sub item ids
showDetailsLink()
show details link
getHighlighter()
get highlighter
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
$ilUser
Definition: imgupload.php:18

References $ilUser, ilSubItemListGUI\$lng, $user, ilObject\_lookupTitle(), ilObjWikiGUI\getGotoLink(), ilSubItemListGUI\getHighlighter(), ilSubItemListGUI\getItemListGUI(), ilSubItemListGUI\getObjId(), ilSubItemListGUI\getRefId(), ilSubItemListGUI\getSubItemIds(), ilWikiPage\lookupTitle(), ilSubItemListGUI\parseRelevance(), and ilSubItemListGUI\showDetailsLink().

+ Here is the call graph for this function:

Field Documentation

◆ $user

ilObjWikiSubItemListGUI::$user
protected

Definition at line 43 of file class.ilObjWikiSubItemListGUI.php.

Referenced by getHTML().


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