4 include_once(
"./Services/Object/classes/class.ilObject2GUI.php");
5 include_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();
49 parent::__construct($a_ref_id, $a_id_type, $a_parent_node_id);
66 $tpl->getStandardTemplate();
70 $tpl->setTitle($this->object->getTitle());
71 $tpl->setTitleIcon(ilObject::_getIcon($this->object->getId()));
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);
184 $this->object->getTitle(),
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) {
231 case self::CFORM_NEW:
234 case self::CFORM_IMPORT:
235 return $this->lng->txt(
"import");
237 case self::CFORM_CLONE:
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"));
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");
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());
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");
490 public static function _goto($a_target)
495 $ilAccess = $DIC->access();
496 $lng = $DIC->language();
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"));
506 $ilCtrl->redirectByClass(array(
"ilobjplugindispatchgui", $class_name),
"");
507 } elseif ($ilAccess->checkAccess(
"visible",
"",
$ref_id)) {
508 $ilCtrl->initBaseClass(
"ilObjPluginDispatchGUI");
509 $ilCtrl->getCallStructure(strtolower(
"ilObjPluginDispatchGUI"));
511 $ilCtrl->redirectByClass(array(
"ilobjplugindispatchgui", $class_name),
"infoScreen");
512 } elseif ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
514 $lng->txt(
"msg_no_perm_read_item"),
517 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
initCreationForms($a_new_type)
Init creation froms.
static getPluginObject(string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname)
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
New implementation of ilObjectGUI.
GUI class for the workflow of copying objects.
const TITLE_LENGTH
max length of object title
txt($a_var)
Wrapper for txt function.
__construct($a_ref_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
addInfoItems($info)
Add items to info screen.
fillCloneTemplate($a_tpl_varname, $a_type)
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
addExportTab()
Add export tab.
static _goto($a_target)
Goto redirection.
lookupParentTitleInCreationMode()
getPlugin()
Get plugin object.
executeCommand()
execute command
static lookupNameForId(string $a_ctype, string $a_cname, string $a_slot_id, string $a_plugin_id)
Export User Interface Class.
initImportForm($a_new_type)
Init object import form.
addPermissionTab()
Add permission tab.
getAfterCreationCmd()
Cmd that will be redirected to after creation of a new object.
if(isset($_POST['submit'])) $form
initCreateForm($a_new_type)
Init object creation form.
getType()
Functions that must be overwritten.
static _lookupObjId($a_id)
setSize($a_size)
Set Size.
This class represents a text property in a property form.
setCols($a_cols)
Set Cols.
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
setTabs()
create tabs (repository/workspace switch)
addLocatorItems()
Add object to locator.
const LP_CONTEXT_REPOSITORY
This class represents a text area property in a property form.
addInfoTab()
Add info screen tab.
initEditForm()
Init object update form.
getCreationFormTitle($a_form_type)
Use custom creation form titles.
getRefId()
get reference id public
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
afterSave(ilObject $newObj)
After saving public.
addAdminLocatorItems($a_do_not_add_object=false)
infoScreen()
show information screen
Class ilObjUserTrackingGUI.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
setAdminTabs()
set admin tabs public