ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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{
20 //page_layout editing
21 var $pg_id = null;
22
26 protected $DIC;
27
31 protected $ctrl;
32
36 protected $tabs;
37
41 public $lng;
42
46 public $tpl;
47
51 function __construct($a_data,$a_id,$a_call_by_reference,$a_prepare_output = true)
52 {
53 global $DIC;
54
55 $this->type = "stys";
56
57 $this->dic = $DIC;
58 $this->ctrl = $DIC->ctrl();
59 $this->lng = $DIC->language();
60 $this->tabs = $DIC->tabs();
61
62 parent::__construct($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
63
64 $this->lng->loadLanguageModule("style");
65 }
66
70 function executeCommand()
71 {
72 $next_class = $this->ctrl->getNextClass($this);
73 $cmd = $this->ctrl->getCmd();
74
75 if ($next_class == "" && in_array($cmd, array("view", "")))
76 {
77 $this->ctrl->redirectByClass("ilSystemStyleMainGUI", "");
78 }
79
80 switch($next_class)
81 {
82 case 'ilpermissiongui':
83 $this->prepareOutput();
84 $this->tabs->activateTab("perm_settings");
85 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
86 $perm_gui = new ilPermissionGUI($this);
87 $ret = $this->ctrl->forwardCommand($perm_gui);
88 break;
89
90 case 'ilsystemstylemaingui':
91 $this->prepareOutput();
92 $this->tabs->activateTab("system_styles");
93 include_once("./Services/Style/System/classes/class.ilSystemStyleMainGUI.php");
94 $gui = new ilSystemStyleMainGUI();
95 $this->ctrl->forwardCommand($gui);
96 break;
97
98 case 'ilpagelayoutadministrationgui':
99 $this->prepareOutput();
100 $this->tabs->activateTab("page_layouts");
101 include_once("./Services/COPage/Layout/classes/class.ilPageLayoutAdministrationGUI.php");
103 $this->ctrl->forwardCommand($gui);
104 break;
105
106 case 'ilcontentstylesettingsgui':
107 include_once("./Services/Style/Content/classes/class.ilContentStyleSettingsGUI.php");
108 $gui = new ilContentStyleSettingsGUI($this);
109 $this->ctrl->forwardCommand($gui);
110 if ($this->ctrl->getCmdClass() == "ilcontentstylesettingsgui")
111 {
112 $this->tabs->activateTab("content_styles");
113 }
114 break;
115
116 default:
117 $this->prepareOutput();
118 $cmd .= "Object";
119 $this->$cmd();
120
121 break;
122 }
123 return true;
124 }
125
130/* function saveObject()
131 {
132 global $rbacadmin;
133
134 // create and insert forum in objecttree
135 $newObj = parent::saveObject();
136
137 // put here object specific stuff
138
139 // always send a message
140 ilUtil::sendInfo($this->lng->txt("object_added"),true);
141
142 ilUtil::redirect($this->getReturnLocation("save",$this->ctrl->getLinkTarget($this,"","",false,false)));
143 }*/
144
145
146 function getAdminTabs()
147 {
148 $this->getTabs();
149 }
150
156 function getTabs()
157 {
158 global $rbacsystem, $lng, $ilTabs;
159
160 if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
161 {
162 $this->tabs_gui->addTab("system_styles", $this->lng->txt("system_styles"),
163 $this->ctrl->getLinkTargetByClass("ilsystemstylemaingui"));
164
165 $this->tabs_gui->addTab("content_styles", $this->lng->txt("content_styles"),
166 $this->ctrl->getLinkTargetByClass("ilcontentstylesettingsgui", "edit"));
167
168 $this->tabs_gui->addTab("page_layouts", $this->lng->txt("page_layouts"),
169 $this->ctrl->getLinkTargetByClass("ilpagelayoutadministrationgui", ""));
170 }
171
172 if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
173 {
174 $this->tabs_gui->addTab("perm_settings", $this->lng->txt("perm_settings"),
175 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"));
176 }
177 }
178
179}
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
$cmd
Definition: sahs_server.php:35