ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
class.ilObjFolderListGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
29{
31
32 public function init(): void
33 {
35 global $DIC;
36
37 $this->static_link_enabled = true;
38 $this->delete_enabled = true;
39 $this->cut_enabled = true;
40 $this->copy_enabled = true;
41 $this->subscribe_enabled = true;
42 $this->link_enabled = false;
43 $this->info_screen_enabled = true;
44 $this->type = "fold";
45 $this->gui_class_name = "ilobjfoldergui";
46
47 // general commands array
48 $this->commands = ilObjFolderAccess::_getCommands();
49 $this->folder_request = $DIC
50 ->folder()
51 ->internal()
52 ->gui()
53 ->standardRequest();
54 }
55
56 public function getCommandLink(string $cmd): string
57 {
58 $ilCtrl = $this->ctrl;
59
60 // BEGIN WebDAV: Mount webfolder.
61 switch ($cmd) {
62 default:
63 if ($cmd === 'mount_webfolder') {
64 global $DIC;
65 global $DIC;
67 $webdav = $DIC[ILIAS\WebDAV\Environment::class];
68 if ($webdav->isActive()) {
69 $cmd_link = $webdav->getUriToMountInstructionModalByRef($this->ref_id);
70 } else {
71 $cmd_link = "";
72 }
73 break;
74 }
75
76 // separate method for this line
77 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
78 $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $cmd);
79 $ilCtrl->setParameterByClass(
80 "ilrepositorygui",
81 "ref_id",
82 $this->folder_request->getRefId()
83 );
84 break;
85 }
86
87 return $cmd_link;
88 }
89}
static _getCommands()
get commands
Class ilObjFolderListGUI.
StandardGUIRequest $folder_request
ilCtrlInterface $ctrl
global $DIC
Definition: shib_login.php:26