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);
103 case 'ilcommonactiondispatchergui':
104 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
106 $this->ctrl->forwardCommand($gui);
109 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
118 if (
$cmd ==
"infoScreen")
120 $ilCtrl->setCmd(
"showSummary");
121 $ilCtrl->setCmdClass(
"ilinfoscreengui");
132 $this->performCommand(
$cmd);
153 $ilLocator->addItem($this->object->getTitle(),
165 return $this->plugin;
171 final protected function txt($a_var)
186 case self::CFORM_NEW:
189 case self::CFORM_IMPORT:
190 return $this->lng->txt(
"import");
192 case self::CFORM_CLONE:
193 return $this->
txt(
"objs_".$this->
getType().
"_duplicate");
224 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
226 $form->setTarget(
"_top");
227 $form->setFormAction($this->ctrl->getFormAction($this,
"save"));
228 $form->setTitle($this->
txt($a_new_type.
"_new"));
234 $ti->setRequired(
true);
243 $form->addCommandButton(
"save", $this->
txt($a_new_type.
"_add"));
244 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
258 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
260 $form->setTarget(
"_top");
261 $form->setFormAction($ilCtrl->getFormAction($this,
"update"));
262 $form->setTitle($lng->txt(
"edit"));
268 $ti->setRequired(
true);
277 $form->addCommandButton(
"update", $lng->txt(
"save"));
291 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
293 $form->setTarget(
"_top");
294 $form->setFormAction($this->ctrl->getFormAction($this,
"importFile"));
295 $form->setTitle($this->lng->txt(
"import"));
297 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
298 $fi =
new ilFileInputGUI($this->lng->txt(
"import_file"),
"importfile");
300 $fi->setRequired(
true);
303 $form->addCommandButton(
"importFile", $this->lng->txt(
"import"));
304 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
319 $ilCtrl->initBaseClass(
"ilObjPluginDispatchGUI");
320 $ilCtrl->setTargetScript(
"ilias.php");
321 $ilCtrl->getCallStructure(strtolower(
"ilObjPluginDispatchGUI"));
328 $ilCtrl->setParameterByClass(get_class($this),
"ref_id", $newObj->getRefId());
329 $ilCtrl->redirectByClass(array(
"ilobjplugindispatchgui", get_class($this)), $this->
getAfterCreationCmd());
346 global $ilAccess, $ilTabs;
349 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId()))
351 $ilTabs->addTarget(
"info_short",
352 $this->ctrl->getLinkTargetByClass(
353 "ilinfoscreengui",
"showSummary"),
363 global $ilAccess, $ilTabs,
$ilCtrl;
366 if($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId()))
368 $ilTabs->addTarget(
"perm_settings",
369 $ilCtrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"),
370 array(
"perm",
"info",
"owner"),
'ilpermissiongui');
382 $ilTabs->setTabActive(
"info_short");
386 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
388 $info->enablePrivateNotes();
391 $lng->loadLanguageModule(
"meta");
396 $ret = $ilCtrl->forwardCommand($info);
410 public static function _goto($a_target)
414 $t = explode(
"_", $a_target[0]);
416 $class_name = $a_target[1];
418 if ($ilAccess->checkAccess(
"read",
"",
$ref_id))
420 $ilCtrl->initBaseClass(
"ilObjPluginDispatchGUI");
421 $ilCtrl->setTargetScript(
"ilias.php");
422 $ilCtrl->getCallStructure(strtolower(
"ilObjPluginDispatchGUI"));
423 $ilCtrl->setParameterByClass($class_name,
"ref_id",
$ref_id);
424 $ilCtrl->redirectByClass(array(
"ilobjplugindispatchgui", $class_name),
"");
426 else if($ilAccess->checkAccess(
"visible",
"",
$ref_id))
428 $ilCtrl->initBaseClass(
"ilObjPluginDispatchGUI");
429 $ilCtrl->setTargetScript(
"ilias.php");
430 $ilCtrl->getCallStructure(strtolower(
"ilObjPluginDispatchGUI"));
431 $ilCtrl->setParameterByClass($class_name,
"ref_id",
$ref_id);
432 $ilCtrl->redirectByClass(array(
"ilobjplugindispatchgui", $class_name),
"infoScreen");
434 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
438 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");