4include_once(
"./Services/Object/classes/class.ilObject2GUI.php");
5include_once(
"./Services/Component/classes/class.ilPlugin.php");
36 public function __construct($a_ref_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
40 $this->ctrl =
$DIC->ctrl();
41 $this->tpl =
$DIC[
"tpl"];
42 $this->access =
$DIC->access();
43 $this->lng =
$DIC->language();
44 $this->nav_history =
$DIC[
"ilNavigationHistory"];
45 $this->tabs =
$DIC->tabs();
46 $this->locator =
$DIC[
"ilLocator"];
47 $this->plugin_admin =
$DIC[
"ilPluginAdmin"];
48 $this->
user = $DIC->user();
66 $tpl->loadStandardTemplate();
70 $tpl->setTitle($this->object->getTitle());
74 if (strtolower(
$_GET[
"baseClass"]) !=
"iladministrationgui") {
83 if ($ilAccess->checkAccess(
'read',
'', $this->object->getRefId())) {
84 $ilNavigationHistory->addItem(
85 $this->object->getRefId(),
87 $this->object->getType()
100 $next_class = $this->ctrl->getNextClass($this);
101 $cmd = $this->ctrl->getCmd();
103 switch ($next_class) {
104 case "ilinfoscreengui":
109 case 'ilpermissiongui':
110 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
112 $ilTabs->setTabActive(
"perm_settings");
113 $ilCtrl->forwardCommand($perm_gui);
116 case 'ilobjectcopygui':
117 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
119 $cp->setType($this->
getType());
120 $this->ctrl->forwardCommand($cp);
125 $this->tabs->setTabActive(
"export");
126 include_once
'./Services/Export/classes/class.ilExportGUI.php';
128 $exp->addFormat(
'xml');
129 $this->ctrl->forwardCommand($exp);
132 case 'illearningprogressgui':
133 $ilTabs->setTabActive(
"learning_progress");
134 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
137 $this->object->getRefId(),
140 $this->ctrl->forwardCommand($new_gui);
142 case 'ilcommonactiondispatchergui':
143 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
145 $this->ctrl->forwardCommand($gui);
160 if ($cmd ==
"infoScreen") {
161 $ilCtrl->setCmd(
"showSummary");
162 $ilCtrl->setCmdClass(
"ilinfoscreengui");
165 $this->performCommand($cmd);
171 $tpl->printToStdout();
184 $this->object->getTitle(),
185 $this->ctrl->getLinkTarget($this, $this->getStandardCmd()),
199 if (!$this->plugin) {
207 if (!is_object($this->plugin)) {
208 throw new ilPluginException(
"ilObjectPluginGUI: Could not instantiate plugin object for type " . $this->
getType() .
".");
217 final protected function txt($a_var)
230 switch ($a_form_type) {
235 return $this->lng->txt(
"import");
238 return $this->
txt(
"objs_" . $this->
getType() .
"_duplicate");
283 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
285 $form->setTarget(
"_top");
286 $form->setFormAction($this->ctrl->getFormAction($this,
"save"));
287 $form->setTitle($this->
txt($a_new_type .
"_new"));
293 $ti->setRequired(
true);
302 $form->addCommandButton(
"save", $this->
txt($a_new_type .
"_add"));
303 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
318 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
320 $form->setTarget(
"_top");
321 $form->setFormAction($ilCtrl->getFormAction($this,
"update"));
322 $form->setTitle(
$lng->txt(
"edit"));
328 $ti->setRequired(
true);
337 $form->addCommandButton(
"update",
$lng->txt(
"save"));
351 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
353 $form->setTarget(
"_top");
354 $form->setFormAction($this->ctrl->getFormAction($this,
"importFile"));
355 $form->setTitle($this->lng->txt(
"import"));
357 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
358 $fi =
new ilFileInputGUI($this->lng->txt(
"import_file"),
"importfile");
359 $fi->setSuffixes(array(
"zip"));
360 $fi->setRequired(
true);
363 $form->addCommandButton(
"importFile", $this->lng->txt(
"import"));
364 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
377 ilUtil::sendSuccess($this->lng->txt(
"object_added"),
true);
379 $ilCtrl->initBaseClass(
"ilObjPluginDispatchGUI");
380 $ilCtrl->getCallStructure(strtolower(
"ilObjPluginDispatchGUI"));
382 $ilCtrl->setParameterByClass(get_class($this),
"ref_id", $newObj->
getRefId());
383 $ilCtrl->redirectByClass(array(
"ilobjplugindispatchgui", get_class($this)), $this->
getAfterCreationCmd());
404 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId())) {
407 $this->ctrl->getLinkTargetByClass(
426 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
429 $ilCtrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"),
430 array(
"perm",
"info",
"owner"),
443 if ($this->access->checkAccess(
'write',
"", $this->object->getRefId())) {
444 $this->tabs->addTarget(
446 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
''),
462 $ilTabs->activateTab(
"info_short");
466 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
468 $info->enablePrivateNotes();
471 $lng->loadLanguageModule(
"meta");
476 $ilCtrl->forwardCommand($info);
490 public static function _goto($a_target)
494 $ilCtrl =
$DIC->ctrl();
495 $ilAccess =
$DIC->access();
498 $t = explode(
"_", $a_target[0]);
500 $class_name = $a_target[1];
502 if ($ilAccess->checkAccess(
"read",
"",
$ref_id)) {
503 $ilCtrl->initBaseClass(
"ilObjPluginDispatchGUI");
504 $ilCtrl->getCallStructure(strtolower(
"ilObjPluginDispatchGUI"));
505 $ilCtrl->setParameterByClass($class_name,
"ref_id",
$ref_id);
506 $ilCtrl->redirectByClass(array(
"ilobjplugindispatchgui", $class_name),
"");
507 } elseif ($ilAccess->checkAccess(
"visible",
"",
$ref_id)) {
508 $ilCtrl->initBaseClass(
"ilObjPluginDispatchGUI");
509 $ilCtrl->getCallStructure(strtolower(
"ilObjPluginDispatchGUI"));
510 $ilCtrl->setParameterByClass($class_name,
"ref_id",
$ref_id);
511 $ilCtrl->redirectByClass(array(
"ilobjplugindispatchgui", $class_name),
"infoScreen");
514 $lng->txt(
"msg_no_perm_read_item"),
517 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
An exception for terminatinating execution or to throw for unit testing.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Export User Interface Class.
const LP_CONTEXT_REPOSITORY
Class ilObjUserTrackingGUI.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
New implementation of ilObjectGUI.
getType()
Functions that must be overwritten.
setTabs()
create tabs (repository/workspace switch)
fillCloneTemplate($a_tpl_varname, $a_type)
Fill object clone template This method can be called from any object GUI class that wants to offer ob...
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
getCreationMode()
get creation mode
addAdminLocatorItems($a_do_not_add_object=false)
should be overwritten to add object specific items (repository items are preloaded)
GUI class for the workflow of copying objects.
setAdminTabs()
set admin tabs @access public
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
initEditForm()
Init object update form.
getPlugin()
Get plugin object.
executeCommand()
execute command
getAfterCreationCmd()
Cmd that will be redirected to after creation of a new object.
initCreationForms($a_new_type)
Init creation froms.
lookupParentTitleInCreationMode()
addInfoTab()
Add info screen tab.
infoScreen()
show information screen
addInfoItems($info)
Add items to info screen.
static _goto($a_target)
Goto redirection.
getCreationFormTitle($a_form_type)
Use custom creation form titles.
__construct($a_ref_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
addLocatorItems()
Add object to locator.
afterSave(ilObject $newObj)
After saving @access public.
initImportForm($a_new_type)
Init object import form.
initCreateForm($a_new_type)
Init object creation form.
txt($a_var)
Wrapper for txt function.
addExportTab()
Add export tab.
addPermissionTab()
Add permission tab.
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
const TITLE_LENGTH
max length of object title
static _lookupTitle($a_id)
lookup object title
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
getRefId()
get reference id @access public
static _lookupType($a_id, $a_reference=false)
lookup object type
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static lookupNameForId(string $a_ctype, string $a_cname, string $a_slot_id, string $a_plugin_id)
static getPluginObject(string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname)
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc