ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilHTLMEditorGUI Class Reference

GUI class for learning module editor. More...

+ Inheritance diagram for ilHTLMEditorGUI:
+ Collaboration diagram for ilHTLMEditorGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 

Data Fields

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

Protected Attributes

StandardGUIRequest $request
 
ilCtrl $ctrl
 
ilRbacSystem $rbacsystem
 
ilAccessHandler $access
 
ilNavigationHistory $nav_history
 

Detailed Description

GUI class for learning module editor.

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

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

Constructor & Destructor Documentation

◆ __construct()

ilHTLMEditorGUI::__construct ( )

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

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

39  {
40  global $DIC;
41 
42  $this->rbacsystem = $DIC->rbac()->system();
43  $this->access = $DIC->access();
44  $this->nav_history = $DIC["ilNavigationHistory"];
45  $tpl = $DIC["tpl"];
46  $lng = $DIC->language();
47  $objDefinition = $DIC["objDefinition"];
48  $ilCtrl = $DIC->ctrl();
49  $rbacsystem = $DIC->rbac()->system();
50  $this->request = $DIC->htmlLearningModule()
51  ->internal()
52  ->gui()
53  ->standardRequest();
54 
55  $lng->loadLanguageModule("content");
56 
57  // check write permission
58  if (!$rbacsystem->checkAccess("write", $this->request->getRefId())) {
59  throw new ilPermissionException($lng->txt("permission_denied"));
60  }
61 
62  $this->ctrl = $ilCtrl;
63 
64  //$this->ctrl->saveParameter($this, array("ref_id", "obj_id"));
65  $this->ctrl->saveParameter($this, array("ref_id"));
66 
67  // initiate variables
68  $this->tpl = $tpl;
69  $this->lng = $lng;
70  $this->objDefinition = $objDefinition;
71  $this->ref_id = $this->request->getRefId();
72  }
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...
loadLanguageModule(string $a_module)
Load language module.
checkAccess(string $a_operations, int $a_ref_id, string $a_type="")
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this ...
global $DIC
Definition: shib_login.php:22
ilGlobalTemplateInterface $tpl
ilObjectDefinition $objDefinition
+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilHTLMEditorGUI::executeCommand ( )

Definition at line 74 of file class.ilHTLMEditorGUI.php.

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

74  : void
75  {
76  $tpl = $this->tpl;
77  $ilCtrl = $this->ctrl;
78  $ilAccess = $this->access;
79  $ilNavigationHistory = $this->nav_history;
80 
81  $next_class = $this->ctrl->getNextClass($this);
82  $cmd = $this->ctrl->getCmd("");
83 
84  // add entry to navigation history
85  if ($ilAccess->checkAccess("read", "", $this->ref_id)) {
86  $ilCtrl->setParameterByClass("ilobjfilebasedlmgui", "ref_id", $this->ref_id);
87  $ilNavigationHistory->addItem(
88  $this->ref_id,
89  $ilCtrl->getLinkTargetByClass(array("ilrepositorygui", "ilobjfilebasedlmgui"), "infoScreen"),
90  "htlm"
91  );
92  }
93 
94  switch ($next_class) {
95  case "ilobjfilebasedlmgui":
96  $fblm_gui = new ilObjFileBasedLMGUI("", $this->ref_id, true, false);
97  $ilCtrl->forwardCommand($fblm_gui);
99  break;
100 
101  default:
102  $this->ctrl->saveParameterByClass(ilObjFileBasedLMGUI::class, "ref_id");
103  $this->ctrl->redirectByClass(ilObjFileBasedLMGUI::class, "");
104  break;
105  }
106  }
ilNavigationHistory $nav_history
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
ilGlobalTemplateInterface $tpl
User Interface class for file based learning modules (HTML)
ilAccessHandler $access
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilHTLMEditorGUI::$access
protected

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

Referenced by executeCommand().

◆ $ctrl

ilCtrl ilHTLMEditorGUI::$ctrl
protected

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

Referenced by executeCommand().

◆ $lng

ilLanguage ilHTLMEditorGUI::$lng

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

Referenced by __construct().

◆ $nav_history

ilNavigationHistory ilHTLMEditorGUI::$nav_history
protected

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

Referenced by executeCommand().

◆ $objDefinition

ilObjectDefinition ilHTLMEditorGUI::$objDefinition

Definition at line 35 of file class.ilHTLMEditorGUI.php.

Referenced by __construct().

◆ $rbacsystem

ilRbacSystem ilHTLMEditorGUI::$rbacsystem
protected

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

◆ $ref_id

int ilHTLMEditorGUI::$ref_id

Definition at line 36 of file class.ilHTLMEditorGUI.php.

◆ $request

StandardGUIRequest ilHTLMEditorGUI::$request
protected

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

◆ $tpl

ilGlobalTemplateInterface ilHTLMEditorGUI::$tpl

Definition at line 33 of file class.ilHTLMEditorGUI.php.

Referenced by __construct(), and executeCommand().


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