ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
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':
97 global $DIC;
99 $webdav = $DIC[ILIAS\WebDAV\Environment::class];
100 if ($webdav->isActive()) {
101 return $webdav->getUriToMountInstructionModalByRef($this->ref_id);
102 }
103 break;
104 default:
105 // separate method for this line
106 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
107 $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $cmd);
108 $ilCtrl->setParameterByClass(
109 "ilrepositorygui",
110 "ref_id",
111 $this->cat_request->getRefId()
112 );
113 break;
114 }
115 // END WebDAV
116
117 return $cmd_link;
118 }
119
121 {
122 return true;
123 }
124}
static _getInstanceByObjectType(string $a_type)
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
static _getCommands()
get commands
Class ilObjCategoryListGUI.
ilCtrlInterface $ctrl
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26