ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilGlossaryEditorGUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
18 {
22  protected $ctrl;
23 
27  protected $lng;
28 
32  protected $access;
33 
37  protected $nav_history;
38 
42  protected $error;
43 
44  public function __construct()
45  {
46  global $DIC;
47 
48  $this->lng = $DIC->language();
49  $this->access = $DIC->access();
50  $this->nav_history = $DIC["ilNavigationHistory"];
51  $this->error = $DIC["ilErr"];
52  $ilCtrl = $DIC->ctrl();
53  $lng = $DIC->language();
54  $ilAccess = $DIC->access();
55  $ilNavigationHistory = $DIC["ilNavigationHistory"];
56  $ilErr = $DIC["ilErr"];
57 
58  // initialisation stuff
59  $this->ctrl = $ilCtrl;
60  $lng->loadLanguageModule("content");
61 
62  // check write permission
63  if (!$ilAccess->checkAccess("write", "", $_GET["ref_id"]) &&
64  !$ilAccess->checkAccess("edit_content", "", $_GET["ref_id"])) {
65  $ilErr->raiseError($lng->txt("permission_denied"), $ilErr->MESSAGE);
66  }
67 
68  $ilNavigationHistory->addItem(
69  $_GET["ref_id"],
70  "ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=" . $_GET["ref_id"],
71  "glo"
72  );
73  }
74 
78  public function executeCommand()
79  {
80  $lng = $this->lng;
81  $ilAccess = $this->access;
82 
83  $cmd = $this->ctrl->getCmd();
84  $next_class = $this->ctrl->getNextClass($this);
85  if ($next_class == "") {
86  $this->ctrl->setCmdClass("ilobjglossarygui");
87  $this->ctrl->setCmd("");
88  }
89 
90  switch ($next_class) {
91  case 'ilobjglossarygui':
92  default:
93  require_once "./Modules/Glossary/classes/class.ilObjGlossaryGUI.php";
94  $glossary_gui = new ilObjGlossaryGUI("", $_GET["ref_id"], true, false);
95  $this->ctrl->forwardCommand($glossary_gui);
96  break;
97  }
98  }
99 }
Class ilGlossaryGUI.
global $ilErr
Definition: raiseError.php:16
global $DIC
Definition: saml.php:7
Class ilGlossaryEditorGUI.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
executeCommand()
execute command