ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilObjWikiSubItemListGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

 __construct (string $a_cmd_class)
 
 getHTML ()
 
- Public Member Functions inherited from ilSubItemListGUI
 __construct (string $cmd_class)
 
 getCmdClass ()
 
 setHighlighter (?ilLuceneHighlighterResultParser $highlighter)
 
 getHighlighter ()
 
 getRefId ()
 
 getObjId ()
 
 getType ()
 
 getSubItemIds (bool $limited=false)
 
 getItemListGUI ()
 
 init (ilObjectListGUI $item_list_gui, int $ref_id, array $subitem_ids)
 
 getHTML ()
 

Protected Attributes

ilObjUser $user
 
- Protected Attributes inherited from ilSubItemListGUI
ilCtrlInterface $ctrl
 
ilLanguage $lng
 
string $cmd_class = ''
 
ilTemplate $tpl = null
 
ilLuceneHighlighterResultParser $highlighter = null
 
array $subitem_ids = []
 
ilObjectListGUI $item_list_gui = null
 
int $ref_id = 0
 
int $obj_id = 0
 
string $type = ''
 

Additional Inherited Members

- Static Public Member Functions inherited from ilSubItemListGUI
static setShowDetails (int $obj_id)
 set show details. More...
 
static resetDetails ()
 As long as static::resetDetails is not possible this method is final. More...
 
static enabledDetails (int $obj_id)
 As long as static::enableDetails is not possible this method is final. More...
 
- Protected Member Functions inherited from ilSubItemListGUI
 showDetailsLink ()
 
- Static Protected Attributes inherited from ilSubItemListGUI
static int $MAX_SUBITEMS = 5
 
static array $details = []
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Show wiki pages

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

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

Constructor & Destructor Documentation

◆ __construct()

ilObjWikiSubItemListGUI::__construct ( string  $a_cmd_class)

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

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

30  {
31  global $DIC;
32 
33  parent::__construct($a_cmd_class);
34  $this->lng = $DIC->language();
35  $this->user = $DIC->user();
36  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getHTML()

ilObjWikiSubItemListGUI::getHTML ( )

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

References ilSubItemListGUI\$lng, ilObject\_lookupTitle(), ILIAS\UI\Implementation\Component\Input\ViewControl\getContent(), ilObjWikiGUI\getGotoLink(), ilSubItemListGUI\getHighlighter(), ilSubItemListGUI\getItemListGUI(), ilSubItemListGUI\getObjId(), ilSubItemListGUI\getRefId(), ilSubItemListGUI\getSubItemIds(), ilLanguage\loadLanguageModule(), ilWikiPage\lookupTitle(), ilSubItemListGUI\showDetailsLink(), and ilLanguage\txt().

38  : string
39  {
40  $lng = $this->lng;
41 
42  $lng->loadLanguageModule('content');
43  foreach ($this->getSubItemIds(true) as $sub_item) {
44  if (is_object($this->getHighlighter()) &&
45  $this->getHighlighter()->getContent($this->getObjId(), $sub_item) !== '') {
46  $this->tpl->setCurrentBlock('sea_fragment');
47  $this->tpl->setVariable('TXT_FRAGMENT', $this->getHighlighter()->getContent($this->getObjId(), $sub_item));
48  $this->tpl->parseCurrentBlock();
49  }
50 
51  $this->tpl->setCurrentBlock('subitem');
52 
53  // TODO: subitem type must returned from lucene
54  $title = (string) ilWikiPage::lookupTitle($sub_item);
55  if ($title !== '') {
56  // Page
57  $this->tpl->setVariable('SUBITEM_TYPE', $lng->txt('obj_pg'));
58  $this->tpl->setVariable('SEPERATOR', ':');
59 
60  $link = '&srcstring=1';
61  $link = ilObjWikiGUI::getGotoLink($this->getRefId(), $title) . $link;
62 
63  $this->tpl->setVariable('LINK', $link);
64  $this->tpl->setVariable('TARGET', $this->getItemListGUI()->getCommandFrame(''));
65  $this->tpl->setVariable('TITLE', $title);
66  } else {
67  $this->tpl->setVariable('SUBITEM_TYPE', $lng->txt('obj_file'));
68  $this->tpl->setVariable('SEPERATOR', ':');
69 
70  // File
71  $this->getItemListGUI()->setChildId('il__file_' . $sub_item);
72  $link = $this->getItemListGUI()->getCommandLink('downloadFile');
73  $this->tpl->setVariable('LINK', $link);
74  $this->tpl->setVariable('TITLE', ilObject::_lookupTitle($sub_item));
75  }
76  $this->tpl->parseCurrentBlock();
77  $this->tpl->parseCurrentBlock();
78  }
79 
80  $this->showDetailsLink();
81 
82  return $this->tpl->get();
83  }
getSubItemIds(bool $limited=false)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static lookupTitle(int $a_page_id, string $lang="-")
loadLanguageModule(string $a_module)
Load language module.
static _lookupTitle(int $obj_id)
static getGotoLink(int $a_ref_id, string $a_page="", string $lang="-")
+ Here is the call graph for this function:

Field Documentation

◆ $user

ilObjUser ilObjWikiSubItemListGUI::$user
protected

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


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