123 : void
124 {
129 if (
130 ($this->
user->isAnonymous() || !($this->user->getId() >= 1)) &&
132 $this->http->request()->getServerParams()['SERVER_NAME']
133 )
134 ) {
135 $this->
ctrl->redirectToURL(
'./login.php?cmd=force_login');
136 }
137 $this->tool_context->claim()->repository();
138
139
140
141 $new_type = $this->request->getNewType();
142
143 if ($new_type !== "" && $new_type !== "sty" && $new_type !== "tax") {
144 $this->creation_mode = true;
145 $ilHelp->setScreenIdComponent($new_type);
147 $this->
ctrl->saveParameter($this, [
"crtcb"]);
148 }
149
151
152
153 if ($this->creation_mode) {
154 $obj_type = $new_type;
155 $class_name = $this->objDefinition->getClassName($obj_type);
156 if (strtolower($class_name) !== "user") {
157 $next_class = strtolower("ilObj" . $class_name . "GUI");
158 } else {
159 $next_class = $this->
ctrl->getNextClass();
160 }
161
162
163
164
165
166
167
169
170 if ($this->
ctrl->getNextClass() !== strtolower(
'ilObj' . $class_name .
'GUI')) {
171 $this->
ctrl->setParameterByClass($next_class,
"new_type", $new_type);
172 $this->
ctrl->redirectByClass($next_class, $this->
ctrl->getCmd());
173 }
174 } elseif ((($next_class = $this->
ctrl->getNextClass($this)) ==
"")
175 || (strcasecmp($next_class, ilRepositoryGUI::class) === 0 && $this->
ctrl->getCmd() ===
"return")) {
176
178 $class_name = $this->objDefinition->getClassName($obj_type);
179 $next_class = strtolower("ilObj" . $class_name . "GUI");
180
181 if ($this->
ctrl->getCmd() ===
"return") {
182 $this->
ctrl->redirectByClass($next_class,
"");
183 }
184
185 if ($this->
ctrl->getCmd() !==
"showRepTree") {
186 $this->
ctrl->setParameterByClass($next_class,
"item_ref_id", $this->request->getItemRefId());
187 $this->
ctrl->redirectByClass($next_class, $this->
ctrl->getCmd());
188 }
189 }
190
191
192
193 if (
$cmd ===
"showRepTree") {
194 $next_class = "";
195 }
196 switch ($next_class) {
197
198
199
200 case strtolower(ilObjFileUploadHandlerGUI::class):
202 break;
203
204 default:
205
206 if ($next_class !== null && $next_class !== "" && strcasecmp($next_class, ilRepositoryGUI::class) !== 0) {
207 $class_path = $this->
ctrl->lookupClassPath($next_class);
208
209
210 $class_name = $this->
ctrl->getClassForClasspath($class_path);
211 if (!$this->creation_mode) {
212 if (is_subclass_of($class_name, "ilObject2GUI")) {
214 } else {
215 $this->gui_obj = new $class_name("", $this->cur_ref_id, true, false);
216 }
217 } elseif (is_subclass_of($class_name, "ilObject2GUI")) {
219 } else {
220 $this->gui_obj = new $class_name("", 0, true, false);
221 }
222 $this->gui_obj->setCreationMode($this->creation_mode);
223 $this->
ctrl->setReturn($this,
"return");
225 } else {
226 $cmd = (string) $this->
ctrl->getCmd(
"");
227
228
231 $this->tpl->printToStdout();
232 } else {
235 }
236 }
237 break;
238 }
239 }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static getLogger(string $a_component_id)
Get component logger.
static _lookupType(int $id, bool $reference=false)
checkAccess(string $a_operations, int $a_ref_id, string $a_type="")
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this ...