4 include_once(
"./Services/Object/classes/class.ilObject2GUI.php");
5 include_once(
"./Services/Component/classes/class.ilPlugin.php");
19 function __construct($a_ref_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
25 if (!is_object($this->plugin))
27 die(
"ilObjectPluginGUI: Could not instantiate plugin object for type ".$this->
getType().
".");
39 $tpl->getStandardTemplate();
44 $tpl->setTitle($this->object->getTitle());
45 $tpl->setTitleIcon($this->plugin->getImagePath(
"icon_".$this->object->getType().
"_b.png"),
46 $lng->txt(
"icon").
" ".$this->
txt(
"obj_".$this->object->getType()));
49 if (strtolower(
$_GET[
"baseClass"]) !=
"iladministrationgui")
62 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
64 $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
65 $ilCtrl->getLinkTarget($this, $this->getStandardCmd()), $this->
getType());
75 $lng->txt(
"obj_".ilObject::_lookupType(
$_GET[
"ref_id"],
true)));
80 $next_class = $this->ctrl->getNextClass($this);
81 $cmd = $this->ctrl->getCmd();
85 case "ilinfoscreengui":
90 case 'ilpermissiongui':
91 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
93 $ilTabs->setTabActive(
"perm_settings");
94 $ret = $ilCtrl->forwardCommand($perm_gui);
97 case 'ilobjectcopygui':
98 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
100 $cp->setType($this->
getType());
101 $this->ctrl->forwardCommand($cp);
105 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
114 if (
$cmd ==
"infoScreen")
116 $ilCtrl->setCmd(
"showSummary");
117 $ilCtrl->setCmdClass(
"ilinfoscreengui");
128 $this->performCommand(
$cmd);
149 $ilLocator->addItem($this->object->getTitle(),
161 return $this->plugin;
167 final protected function txt($a_var)
182 case self::CFORM_NEW:
185 case self::CFORM_IMPORT:
186 return $this->lng->txt(
"import");
188 case self::CFORM_CLONE:
189 return $this->
txt(
"objs_".$this->
getType().
"_duplicate");
220 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
222 $form->setTarget(
"_top");
223 $form->setFormAction($this->ctrl->getFormAction($this,
"save"));
224 $form->setTitle($this->
txt($a_new_type.
"_new"));
230 $ti->setRequired(
true);
239 $form->addCommandButton(
"save", $this->
txt($a_new_type.
"_add"));
240 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
254 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
256 $form->setTarget(
"_top");
257 $form->setFormAction($ilCtrl->getFormAction($this,
"update"));
258 $form->setTitle($lng->txt(
"edit"));
264 $ti->setRequired(
true);
273 $form->addCommandButton(
"update", $lng->txt(
"save"));
287 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
289 $form->setTarget(
"_top");
290 $form->setFormAction($this->ctrl->getFormAction($this,
"importFile"));
291 $form->setTitle($this->lng->txt(
"import"));
293 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
294 $fi =
new ilFileInputGUI($this->lng->txt(
"import_file"),
"importfile");
296 $fi->setRequired(
true);
299 $form->addCommandButton(
"importFile", $this->lng->txt(
"import"));
300 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
315 $ilCtrl->initBaseClass(
"ilObjPluginDispatchGUI");
316 $ilCtrl->setTargetScript(
"ilias.php");
317 $ilCtrl->getCallStructure(strtolower(
"ilObjPluginDispatchGUI"));
324 $ilCtrl->setParameterByClass(get_class($this),
"ref_id", $newObj->getRefId());
325 $ilCtrl->redirectByClass(array(
"ilobjplugindispatchgui", get_class($this)), $this->
getAfterCreationCmd());
342 global $ilAccess, $ilTabs;
345 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId()))
347 $ilTabs->addTarget(
"info_short",
348 $this->ctrl->getLinkTargetByClass(
349 "ilinfoscreengui",
"showSummary"),
359 global $ilAccess, $ilTabs,
$ilCtrl;
362 if($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId()))
364 $ilTabs->addTarget(
"perm_settings",
365 $ilCtrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"),
366 array(
"perm",
"info",
"owner"),
'ilpermissiongui');
378 $ilTabs->setTabActive(
"info_short");
382 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
384 $info->enablePrivateNotes();
387 $lng->loadLanguageModule(
"meta");
392 $ret = $ilCtrl->forwardCommand($info);
410 $t = explode(
"_", $a_target[0]);
412 $class_name = $a_target[1];
414 if ($ilAccess->checkAccess(
"read",
"",
$ref_id))
416 $ilCtrl->initBaseClass(
"ilObjPluginDispatchGUI");
417 $ilCtrl->setTargetScript(
"ilias.php");
418 $ilCtrl->getCallStructure(strtolower(
"ilObjPluginDispatchGUI"));
419 $ilCtrl->setParameterByClass($class_name,
"ref_id",
$ref_id);
420 $ilCtrl->redirectByClass(array(
"ilobjplugindispatchgui", $class_name),
"");
422 else if($ilAccess->checkAccess(
"visible",
"",
$ref_id))
424 $ilCtrl->initBaseClass(
"ilObjPluginDispatchGUI");
425 $ilCtrl->setTargetScript(
"ilias.php");
426 $ilCtrl->getCallStructure(strtolower(
"ilObjPluginDispatchGUI"));
427 $ilCtrl->setParameterByClass($class_name,
"ref_id",
$ref_id);
428 $ilCtrl->redirectByClass(array(
"ilobjplugindispatchgui", $class_name),
"infoScreen");
430 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
434 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");