ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilObjWikiSubItemListGUI Class Reference

Show wiki pages. More...

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

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
 $cmdClass = null
 
 $tpl
 
- 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.

Member Function Documentation

◆ getHTML()

ilObjWikiSubItemListGUI::getHTML ( )

get html

Returns

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

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

45  {
46  global $lng,$ilUser;
47 
48  $lng->loadLanguageModule('content');
49  foreach($this->getSubItemIds(true) as $sub_item)
50  {
51  if(is_object($this->getHighlighter()) and strlen($this->getHighlighter()->getContent($this->getObjId(),$sub_item)))
52  {
53  $this->tpl->setCurrentBlock('sea_fragment');
54  $this->tpl->setVariable('TXT_FRAGMENT',$this->getHighlighter()->getContent($this->getObjId(),$sub_item));
55  $this->tpl->parseCurrentBlock();
56  }
57 
58  $this->tpl->setCurrentBlock('subitem');
59 
60  // TODO: subitem type must returned from lucene
61  if(($title = ilWikiPage::lookupTitle($sub_item)) !== false)
62  {
63  // Page
64  $this->tpl->setVariable('SUBITEM_TYPE',$lng->txt('obj_pg'));
65  $this->tpl->setVariable('SEPERATOR',':');
66 
67  include_once './Services/Search/classes/class.ilUserSearchCache.php';
68  $link = '&srcstring=1';
69  $link = ilObjWikiGUI::getGotoLink($this->getRefId(),$title).$link;
70 
71  $this->tpl->setVariable('LINK',$link);
72  $this->tpl->setVariable('TARGET',$this->getItemListGUI()->getCommandFrame(''));
73  $this->tpl->setVariable('TITLE',$title);
74  $this->tpl->parseCurrentBlock();
75  }
76  else
77  {
78  $this->tpl->setVariable('SUBITEM_TYPE',$lng->txt('obj_file'));
79  $this->tpl->setVariable('SEPERATOR',':');
80 
81  // File
82  $this->getItemListGUI()->setChildId('il__file_'.$sub_item);
83  $link = $this->getItemListGUI()->getCommandLink('downloadFile');
84  $this->tpl->setVariable('LINK',$link);
85  $this->tpl->setVariable('TITLE',ilObject::_lookupTitle($sub_item));
86  $this->tpl->parseCurrentBlock();
87  }
88 
89  if(count($this->getSubItemIds(true)) > 1)
90  {
91  $this->parseRelevance($sub_item);
92  }
93 
94  $this->tpl->parseCurrentBlock();
95  }
96 
97  $this->showDetailsLink();
98 
99  return $this->tpl->get();
100  }
static getGotoLink($a_ref_id, $a_page="")
Get goto link.
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
getHighlighter()
get highlighter
static _lookupTitle($a_id)
lookup object title
showDetailsLink()
show details link
$ilUser
Definition: imgupload.php:18
global $lng
Definition: privfeed.php:17
getItemListGUI()
get item list gui
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: