ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilObjStyleSettingsGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once "./Services/Object/classes/class.ilObjectGUI.php";
5include_once("./Services/COPage/Layout/classes/class.ilPageLayout.php");
6
19{
23 protected $rbacsystem;
24
25 //page_layout editing
26 public $pg_id = null;
27
31 protected $DIC;
32
36 protected $ctrl;
37
41 protected $tabs;
42
46 public $lng;
47
51 public $tpl;
52
56 public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output = true)
57 {
58 global $DIC;
59 $this->rbacsystem = $DIC->rbac()->system();
60
61 $this->type = "stys";
62
63 $this->dic = $DIC;
64 $this->ctrl = $DIC->ctrl();
65 $this->lng = $DIC->language();
66 $this->tabs = $DIC->tabs();
67
68 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
69
70 $this->lng->loadLanguageModule("style");
71 }
72
76 public function executeCommand()
77 {
78 $next_class = $this->ctrl->getNextClass($this);
79 $cmd = $this->ctrl->getCmd();
80
81 if ($next_class == "" && in_array($cmd, array("view", ""))) {
82 $this->ctrl->redirectByClass("ilSystemStyleMainGUI", "");
83 }
84
85 switch ($next_class) {
86 case 'ilpermissiongui':
87 $this->prepareOutput();
88 $this->tabs->activateTab("perm_settings");
89 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
90 $perm_gui = new ilPermissionGUI($this);
91 $ret = $this->ctrl->forwardCommand($perm_gui);
92 break;
93
94 case 'ilsystemstylemaingui':
95 $this->prepareOutput();
96 $this->tabs->activateTab("system_styles");
97 include_once("./Services/Style/System/classes/class.ilSystemStyleMainGUI.php");
98 $gui = new ilSystemStyleMainGUI();
99 $this->ctrl->forwardCommand($gui);
100 break;
101
102 case 'ilpagelayoutadministrationgui':
103 $this->prepareOutput();
104 $this->tabs->activateTab("page_layouts");
105 include_once("./Services/COPage/Layout/classes/class.ilPageLayoutAdministrationGUI.php");
107 $this->ctrl->forwardCommand($gui);
108 break;
109
110 case 'ilcontentstylesettingsgui':
111 include_once("./Services/Style/Content/classes/class.ilContentStyleSettingsGUI.php");
112 $gui = new ilContentStyleSettingsGUI($this);
113 $this->ctrl->forwardCommand($gui);
114 if ($this->ctrl->getCmdClass() == "ilcontentstylesettingsgui") {
115 $this->tabs->activateTab("content_styles");
116 }
117 break;
118
119 default:
120 $this->prepareOutput();
121 $cmd .= "Object";
122 $this->$cmd();
123
124 break;
125 }
126 return true;
127 }
128
133 /* function saveObject()
134 {
135 global $rbacadmin;
136
137 // create and insert forum in objecttree
138 $newObj = parent::saveObject();
139
140 // put here object specific stuff
141
142 // always send a message
143 ilUtil::sendInfo($this->lng->txt("object_added"),true);
144
145 ilUtil::redirect($this->getReturnLocation("save",$this->ctrl->getLinkTarget($this,"","",false,false)));
146 }*/
147
148
149 public function getAdminTabs()
150 {
151 $this->getTabs();
152 }
153
159 public function getTabs()
160 {
163 $ilTabs = $this->tabs;
164
165 if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
166 $this->tabs_gui->addTab(
167 "system_styles",
168 $this->lng->txt("system_styles"),
169 $this->ctrl->getLinkTargetByClass("ilsystemstylemaingui")
170 );
171
172 $this->tabs_gui->addTab(
173 "content_styles",
174 $this->lng->txt("content_styles"),
175 $this->ctrl->getLinkTargetByClass("ilcontentstylesettingsgui", "edit")
176 );
177
178 $this->tabs_gui->addTab(
179 "page_layouts",
180 $this->lng->txt("page_layouts"),
181 $this->ctrl->getLinkTargetByClass("ilpagelayoutadministrationgui", "")
182 );
183 }
184
185 if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
186 $this->tabs_gui->addTab(
187 "perm_settings",
188 $this->lng->txt("perm_settings"),
189 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm")
190 );
191 }
192 }
193}
An exception for terminatinating execution or to throw for unit testing.
Settings UI class for system styles.
Style settings GUI class.
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($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Settings UI class for system styles.
$ret
Definition: parser.php:6