ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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
64 if ($cmd === 'mount_webfolder' && ilDAVActivationChecker::_isActive()) {
65 global $DIC;
66 $uri_builder = new ilWebDAVUriBuilder($DIC->http()->request());
67 $uri_builder->getUriToMountInstructionModalByRef($this->ref_id);
68 $cmd_link = $uri_builder->getUriToMountInstructionModalByRef($this->ref_id);
69 break;
70 }
71
72 // separate method for this line
73 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
74 $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $cmd);
75 $ilCtrl->setParameterByClass(
76 "ilrepositorygui",
77 "ref_id",
78 $this->folder_request->getRefId()
79 );
80 break;
81 }
82
83 return $cmd_link;
84 }
85}
static _getCommands()
get commands
Class ilObjFolderListGUI.
getCommandLink(string $cmd)
Get command link url.
StandardGUIRequest $folder_request
ilCtrlInterface $ctrl
global $DIC
Definition: shib_login.php:26