ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjCategoryListGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
29{
31
35 public function __construct(int $a_context = self::CONTEXT_REPOSITORY)
36 {
38 global $DIC;
39
40 parent::__construct($a_context);
41 $this->ctrl = $DIC->ctrl();
42
43 $this->cat_request = $DIC
44 ->category()
45 ->internal()
46 ->gui()
47 ->standardRequest();
48 }
49
53 public function init(): void
54 {
55 $this->static_link_enabled = true;
56 $this->delete_enabled = true;
57 $this->cut_enabled = true;
58 $this->copy_enabled = true;
59 $this->subscribe_enabled = true;
60 $this->link_enabled = false;
61 $this->info_screen_enabled = true;
62
63 $this->type = "cat";
64 $this->gui_class_name = "ilobjcategorygui";
65
66 $this->substitutions = ilAdvancedMDSubstitution::_getInstanceByObjectType($this->type);
67 if ($this->substitutions->isActive()) {
68 $this->substitutions_enabled = true;
69 }
70
71 // general commands array
72 $this->commands = ilObjCategoryAccess::_getCommands();
73 }
74
75 public function getInfoScreenStatus(): bool
76 {
78 $this->obj_id,
80 '1'
81 )) {
83 }
84
85 return false;
86 }
87
88 public function getCommandLink(string $cmd): string
89 {
90 $ilCtrl = $this->ctrl;
91
92 $cmd_link = "";
93
94 // BEGIN WebDAV
95 switch ($cmd) {
96 case 'mount_webfolder':
98 global $DIC;
99 $uri_builder = new ilWebDAVUriBuilder($DIC->http()->request());
100 return $uri_builder->getUriToMountInstructionModalByRef($this->ref_id);
101 }
102 break;
103 default:
104 // separate method for this line
105 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
106 $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $cmd);
107 $ilCtrl->setParameterByClass(
108 "ilrepositorygui",
109 "ref_id",
110 $this->cat_request->getRefId()
111 );
112 break;
113 }
114 // END WebDAV
115
116 return $cmd_link;
117 }
118
120 {
121 return true;
122 }
123}
static _getInstanceByObjectType(string $a_type)
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
static _getCommands()
get commands
Class ilObjCategoryListGUI.
getCommandLink(string $cmd)
Get command link url.
ilCtrlInterface $ctrl
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26