ILIAS  release_8 Revision v8.23
class.ilObjGlossaryListGUI.php
Go to the documentation of this file.
1 <?php
2 
25 {
26  public function init(): void
27  {
28  $this->static_link_enabled = true;
29  $this->delete_enabled = true;
30  $this->cut_enabled = true;
31  $this->copy_enabled = true;
32  $this->subscribe_enabled = true;
33  $this->link_enabled = true;
34  $this->info_screen_enabled = true;
35  $this->type = "glo";
36  $this->gui_class_name = "ilobjglossarygui";
37 
38  // general commands array
39  $this->commands = ilObjGlossaryAccess::_getCommands();
40  }
41 
42  public function getCommandLink(string $cmd): string
43  {
44  switch ($cmd) {
45  case "view":
46  $cmd_link = "ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $this->ref_id;
47  break;
48 
49  case "edit":
50  $cmd_link = "ilias.php?baseClass=ilGlossaryEditorGUI&amp;ref_id=" . $this->ref_id;
51  break;
52 
53  case "properties":
54  $this->ctrl->setParameterByClass("ilobjglossarygui", "ref_id", $this->ref_id);
55  $cmd_link = $this->ctrl->getLinkTargetByClass(array("ilglossaryeditorgui", "ilobjglossarygui"), $cmd);
56  break;
57 
58  case "infoScreen":
59  $cmd_link = "ilias.php?baseClass=ilGlossaryPresentationGUI&amp;cmd=infoScreen&amp;ref_id=" . $this->ref_id;
60  break;
61 
62  default:
63  $this->ctrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
64  $cmd_link = $this->ctrl->getLinkTargetByClass("ilrepositorygui", $cmd);
65  $this->ctrl->setParameterByClass("ilrepositorygui", "ref_id", $this->requested_ref_id);
66  break;
67  }
68 
69  return $cmd_link;
70  }
71 
72  public function getCommandFrame(string $cmd): string
73  {
74  switch ($cmd) {
75  case "view":
76  case "edit":
77  case "properties":
78  $frame = ilFrameTargetInfo::_getFrame("MainContent");
79  break;
80 
81  default:
82  $frame = "";
83  break;
84  }
85 
86  return $frame;
87  }
88 
89 
90  public function getProperties(): array
91  {
92  $lng = $this->lng;
93  $props = array();
94  if (!ilObjGlossaryAccess::_lookupOnline($this->obj_id)) {
95  $props[] = array("alert" => true, "property" => $lng->txt("status"),
96  "value" => $lng->txt("offline"));
97  }
98  return $props;
99  }
100 }
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getFrame(string $a_class)