ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjStyleSettingsGUI.php
Go to the documentation of this file.
1<?php
2
27{
31 public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output = true)
32 {
33 $this->type = "stys";
34
35 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
36
37 $this->lng->loadLanguageModule("style");
38 }
39
43 public function executeCommand(): void
44 {
45 $next_class = $this->ctrl->getNextClass($this);
46 $cmd = $this->ctrl->getCmd();
47
48 if ($next_class == "" && in_array($cmd, array("view", ""))) {
49 $this->ctrl->redirectByClass("ilSystemStyleMainGUI", "");
50 }
51
52 switch ($next_class) {
53 case 'ilpermissiongui':
54 $this->prepareOutput();
55 $this->tabs_gui->activateTab("perm_settings");
56 $perm_gui = new ilPermissionGUI($this);
57 $this->ctrl->forwardCommand($perm_gui);
58 break;
59
60 case 'ilsystemstylemaingui':
61 $this->prepareOutput();
62 $this->tabs_gui->activateTab("system_styles");
63 $gui = new ilSystemStyleMainGUI();
64 $this->ctrl->forwardCommand($gui);
65 break;
66
67 case 'ilpagelayoutadministrationgui':
68 $this->prepareOutput();
69 $this->tabs_gui->activateTab("page_layouts");
71 $this->ctrl->forwardCommand($gui);
72 break;
73
74 case 'ilcontentstylesettingsgui':
75 $gui = new ilContentStyleSettingsGUI($this);
76 $this->ctrl->forwardCommand($gui);
77 if ($this->ctrl->getCmdClass() == "ilcontentstylesettingsgui") {
78 $this->tabs_gui->activateTab("content_styles");
79 }
80 break;
81
82 default:
83 $this->prepareOutput();
84 $cmd .= "Object";
85 $this->$cmd();
86
87 break;
88 }
89 }
90
95 /* function saveObject()
96 {
97 global $rbacadmin;
98
99 // create and insert forum in objecttree
100 $newObj = parent::saveObject();
101
102 // put here object specific stuff
103
104 // always send a message
105 ilUtil::sendInfo($this->lng->txt("object_added"),true);
106
107 ilUtil::redirect($this->getReturnLocation("save",$this->ctrl->getLinkTarget($this,"","",false,false)));
108 }*/
109
110
111 public function getAdminTabs(): void
112 {
113 $this->getTabs();
114 }
115
121 public function getTabs(): void
122 {
123 if ($this->rbac_system->checkAccess("visible,read", $this->object->getRefId())) {
124 $this->tabs_gui->addTab(
125 "system_styles",
126 $this->lng->txt("system_styles"),
127 $this->ctrl->getLinkTargetByClass("ilsystemstylemaingui")
128 );
129
130 $this->tabs_gui->addTab(
131 "content_styles",
132 $this->lng->txt("content_styles"),
133 $this->ctrl->getLinkTargetByClass("ilcontentstylesettingsgui", "edit")
134 );
135
136 $this->tabs_gui->addTab(
137 "page_layouts",
138 $this->lng->txt("page_layouts"),
139 $this->ctrl->getLinkTargetByClass("ilpagelayoutadministrationgui", "")
140 );
141 }
142
143 if ($this->rbac_system->checkAccess('edit_permission', $this->object->getRefId())) {
144 $this->tabs_gui->addTab(
145 "perm_settings",
146 $this->lng->txt("perm_settings"),
147 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm")
148 );
149 }
150 }
151}
Settings UI class for system styles.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getTabs()
get tabs @access public
__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
Constructor.
Class ilObjectGUI Basic methods of all Output classes.
prepareOutput(bool $show_sub_objects=true)
Settings UI class for system styles.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc