ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilObjFileBasedLMListGUI.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
5include_once "Services/Object/classes/class.ilObjectListGUI.php";
6
16{
22 public function init()
23 {
24 $this->copy_enabled = true;
25 $this->delete_enabled = true;
26 $this->cut_enabled = true;
27 $this->subscribe_enabled = true;
28 $this->link_enabled = true;
29 $this->info_screen_enabled = true;
30 $this->type = "htlm";
31 $this->gui_class_name = "ilobjfilebasedlmgui";
32
33 // general commands array
34 include_once('Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php');
35 $this->commands = ilObjFileBasedLMAccess::_getCommands();
36 }
37
47 public function getCommandLink($a_cmd)
48 {
50
51 switch ($a_cmd) {
52 case "view":
53 $cmd_link = "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=" . $this->ref_id;
54 break;
55
56 case "edit":
57 $cmd_link = "ilias.php?baseClass=ilHTLMEditorGUI&ref_id=" . $this->ref_id;
58 break;
59
60 default:
61 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
62 $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $a_cmd);
63 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
64 break;
65 }
66
67 return $cmd_link;
68 }
69
70
78 public function getCommandFrame($a_cmd)
79 {
80 switch ($a_cmd) {
81 case "view":
82 $frame = "ilContObj" . $this->obj_id;
83 break;
84
85 case "edit":
86 $frame = ilFrameTargetInfo::_getFrame("MainContent");
87 break;
88
89 default:
90 $frame = "";
91 break;
92 }
93
94 return $frame;
95 }
96
97
106 public function getProperties()
107 {
109 $rbacsystem = $this->rbacsystem;
110
111 // centralized offline status
112 $props = parent::getProperties();
113
114 if (!ilObjFileBasedLMAccess::_determineStartUrl($this->obj_id)) {
115 $props[] = array("alert" => true, "property" => $lng->txt("status"),
116 "value" => $lng->txt("no_start_file"));
117 }
118
119 if ($rbacsystem->checkAccess("write", $this->ref_id)) {
120 $props[] = array("alert" => false, "property" => $lng->txt("type"),
121 "value" => $lng->txt("htlm"));
122 }
123
124 return $props;
125 }
126} // END class.ilObjCategoryGUI
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
static _getFrame($a_class, $a_type='')
Get content frame name.
static _determineStartUrl($a_id)
determine start url
Class ilObjFileBasedLMListGUI.
getCommandFrame($a_cmd)
Get command target frame.
getCommandLink($a_cmd)
Overwrite this method, if link target is not build by ctrl class (e.g.
Class ilObjectListGUI.
global $ilCtrl
Definition: ilias.php:18