ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilPluginConfigGUI.php
Go to the documentation of this file.
1<?php
2
35abstract class ilPluginConfigGUI
36{
37 protected ?ilPlugin $plugin_object = null;
38
39 final public function setPluginObject(ilPlugin $a_val): void
40 {
41 $this->plugin_object = $a_val;
42 }
43
44 final public function getPluginObject(): ?ilPlugin
45 {
47 }
48
55 public function executeCommand(): void
56 {
57 global $DIC;
58 $ilCtrl = $DIC->ctrl();
59 $ilTabs = $DIC->tabs();
60 $lng = $DIC->language();
61 $tpl = $DIC['tpl'];
62 $request_wrapper = $DIC->http()->wrapper()->query();
63 $string_trafo = $DIC["refinery"]->kindlyTo()->string();
64
65 $ilCtrl->setParameterByClass("ilobjcomponentsettingsgui", "ctype", $request_wrapper->retrieve("ctype", $string_trafo));
66 $ilCtrl->setParameterByClass("ilobjcomponentsettingsgui", "cname", $request_wrapper->retrieve("cname", $string_trafo));
67 $ilCtrl->setParameterByClass("ilobjcomponentsettingsgui", "slot_id", $request_wrapper->retrieve("slot_id", $string_trafo));
68 $ilCtrl->setParameterByClass("ilobjcomponentsettingsgui", "plugin_id", $request_wrapper->retrieve("plugin_id", $string_trafo));
69 $ilCtrl->setParameterByClass("ilobjcomponentsettingsgui", "pname", $request_wrapper->retrieve("pname", $string_trafo));
70
71 $tpl->setTitle($lng->txt("cmps_plugin") . ": " . $request_wrapper->retrieve("pname", $string_trafo));
72 $tpl->setDescription("");
73
74 $ilTabs->clearTargets();
75
76 if ($request_wrapper->retrieve("plugin_id", $string_trafo)) {
77 $ilTabs->setBackTarget(
78 $lng->txt("cmps_plugin"),
79 $ilCtrl->getLinkTargetByClass("ilobjcomponentsettingsgui", "showPlugin")
80 );
81 } else {
82 $ilTabs->setBackTarget(
83 $lng->txt("cmps_plugins"),
84 $ilCtrl->getLinkTargetByClass("ilobjcomponentsettingsgui", "listPlugins")
85 );
86 }
87
88 $this->addTabs($ilTabs);
89
90 $next_class = $ilCtrl->getNextClass();
91 if ($next_class && $this->performNextClass($next_class)) {
92 return;
93 }
94 $this->performCommand($ilCtrl->getCmd("configure"));
95 }
96
97 abstract public function performCommand(string $cmd): void;
98
99 protected function performNextClass(string $next_class): bool
100 {
101 return false;
102 }
103
104 protected function addTabs(ilTabsGUI $tabs): void
105 {
106 }
107}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setPluginObject(ilPlugin $a_val)
performCommand(string $cmd)
executeCommand()
Execute command.
performNextClass(string $next_class)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $lng
Definition: privfeed.php:31
global $DIC
Definition: shib_login.php:26