ILIAS  release_8 Revision v8.24
class.ilObjFolderListGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
19
26{
28
29 public function init(): void
30 {
32 global $DIC;
33
34 $this->static_link_enabled = true;
35 $this->delete_enabled = true;
36 $this->cut_enabled = true;
37 $this->copy_enabled = true;
38 $this->subscribe_enabled = true;
39 $this->link_enabled = false;
40 $this->info_screen_enabled = true;
41 $this->type = "fold";
42 $this->gui_class_name = "ilobjfoldergui";
43
44 // general commands array
45 $this->commands = ilObjFolderAccess::_getCommands();
46 $this->folder_request = $DIC
47 ->folder()
48 ->internal()
49 ->gui()
50 ->standardRequest();
51 }
52
53 public function getCommandLink(string $cmd): string
54 {
55 $ilCtrl = $this->ctrl;
56
57 // BEGIN WebDAV: Mount webfolder.
58 switch ($cmd) {
59 default:
60
61 if ($cmd === 'mount_webfolder' && ilDAVActivationChecker::_isActive()) {
62 global $DIC;
63 $uri_builder = new ilWebDAVUriBuilder($DIC->http()->request());
64 $uri_builder->getUriToMountInstructionModalByRef($this->ref_id);
65 $cmd_link = $uri_builder->getUriToMountInstructionModalByRef($this->ref_id);
66 break;
67 }
68
69 // separate method for this line
70 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
71 $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $cmd);
72 $ilCtrl->setParameterByClass(
73 "ilrepositorygui",
74 "ref_id",
75 $this->folder_request->getRefId()
76 );
77 break;
78 }
79
80 return $cmd_link;
81 }
82}
static _getCommands()
get commands
Class ilObjFolderListGUI.
getCommandLink(string $cmd)
Get command link url.
StandardGUIRequest $folder_request
ilCtrlInterface $ctrl
global $DIC
Definition: feed.php:28