ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilHTLMPresentationGUI 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 ilHTLMPresentationGUI:
+ Collaboration diagram for ilHTLMPresentationGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 

Data Fields

ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilObjectDefinition $objDefinition
 
int $ref_id
 

Protected Attributes

ILIAS HTMLLearningModule StandardGUIRequest $request
 
ilCtrl $ctrl
 
ilAccessHandler $access
 
ilNavigationHistory $nav_history
 

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

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de @ilCtrl_Calls ilHTLMPresentationGUI: ilObjFileBasedLMGUI

Definition at line 23 of file class.ilHTLMPresentationGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilHTLMPresentationGUI::__construct ( )

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

35 {
36 global $DIC;
37
38 $this->access = $DIC->access();
39 $this->nav_history = $DIC["ilNavigationHistory"];
40 $tpl = $DIC["tpl"];
41 $lng = $DIC->language();
42 $objDefinition = $DIC["objDefinition"];
43 $ilCtrl = $DIC->ctrl();
44 $ilAccess = $DIC->access();
45 $this->request = $DIC->htmlLearningModule()
46 ->internal()
47 ->gui()
48 ->standardRequest();
49 $this->ref_id = $this->request->getRefId();
50
51 $lng->loadLanguageModule("content");
52
53 // check write permission
54 if (!$ilAccess->checkAccess("read", "", $this->ref_id)) {
55 throw new ilPermissionException($lng->txt("permission_denied"));
56 }
57
58
59 $this->ctrl = $ilCtrl;
60
61 //$this->ctrl->saveParameter($this, array("ref_id", "obj_id"));
62 $this->ctrl->saveParameter($this, array("ref_id"));
63
64 // initiate variables
65 $this->tpl = $tpl;
66 $this->lng = $lng;
67 $this->objDefinition = $objDefinition;
68 }
ilGlobalTemplateInterface $tpl
loadLanguageModule(string $a_module)
Load language module.
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...
global $DIC
Definition: shib_login.php:26

References $DIC, $lng, $objDefinition, $tpl, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilLanguage\loadLanguageModule(), and ilLanguage\txt().

+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilHTLMPresentationGUI::executeCommand ( )

Definition at line 70 of file class.ilHTLMPresentationGUI.php.

70 : void
71 {
73 $ilCtrl = $this->ctrl;
74 $ilAccess = $this->access;
75 $ilNavigationHistory = $this->nav_history;
76
77 // add entry to navigation history
78 if ($ilAccess->checkAccess("read", "", $this->ref_id)) {
79 $ilCtrl->setParameterByClass("ilobjfilebasedlmgui", "ref_id", $this->ref_id);
80 $ilNavigationHistory->addItem(
81 $this->ref_id,
82 $ilCtrl->getLinkTargetByClass(array("ilrepositorygui", "ilobjfilebasedlmgui"), "infoScreen"),
83 "htlm"
84 );
85 }
86
87 $next_class = $this->ctrl->getNextClass($this);
88
89 switch ($next_class) {
90 case "ilobjfilebasedlmgui":
91 $fblm_gui = new ilObjFileBasedLMGUI("", $this->ref_id, true, false);
92 $ilCtrl->forwardCommand($fblm_gui);
94 break;
95
96 default:
97 $this->ctrl->saveParameterByClass(ilObjFileBasedLMGUI::class, "ref_id");
98 $this->ctrl->redirectByClass(ilObjFileBasedLMGUI::class, "showLearningModule");
99 break;
100 }
101 }
addItem(int $a_ref_id, string $a_link, string $a_type, string $a_title="", ?int $a_sub_obj_id=null, string $a_goto_link="")
Add an item to the stack.
User Interface class for file based learning modules (HTML)
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)

References $access, $ctrl, $nav_history, $tpl, ilNavigationHistory\addItem(), ILIAS\Repository\ctrl(), and ILIAS\UICore\GlobalTemplate\printToStdout().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilHTLMPresentationGUI::$access
protected

Definition at line 27 of file class.ilHTLMPresentationGUI.php.

Referenced by executeCommand().

◆ $ctrl

ilCtrl ilHTLMPresentationGUI::$ctrl
protected

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

Referenced by executeCommand().

◆ $lng

ilLanguage ilHTLMPresentationGUI::$lng

Definition at line 30 of file class.ilHTLMPresentationGUI.php.

Referenced by __construct().

◆ $nav_history

ilNavigationHistory ilHTLMPresentationGUI::$nav_history
protected

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

Referenced by executeCommand().

◆ $objDefinition

ilObjectDefinition ilHTLMPresentationGUI::$objDefinition

Definition at line 31 of file class.ilHTLMPresentationGUI.php.

Referenced by __construct().

◆ $ref_id

int ilHTLMPresentationGUI::$ref_id

Definition at line 32 of file class.ilHTLMPresentationGUI.php.

◆ $request

ILIAS HTMLLearningModule StandardGUIRequest ilHTLMPresentationGUI::$request
protected

Definition at line 25 of file class.ilHTLMPresentationGUI.php.

◆ $tpl

ilGlobalTemplateInterface ilHTLMPresentationGUI::$tpl

Definition at line 29 of file class.ilHTLMPresentationGUI.php.

Referenced by __construct(), and executeCommand().


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