ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjectPluginGUI Class Reference
+ Inheritance diagram for ilObjectPluginGUI:
+ Collaboration diagram for ilObjectPluginGUI:

Public Member Functions

 __construct ($a_ref_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 addLocatorItems ()
 Add object to locator. More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initEditForm ()
 Init object update form. More...
 
 afterSave (ilObject $newObj)
 After saving @access public. More...
 
 getAfterCreationCmd ()
 Cmd that will be redirected to after creation of a new object. More...
 
 getStandardCmd ()
 
 addInfoTab ()
 Add info screen tab. More...
 
 addPermissionTab ()
 Add permission tab. More...
 
 addExportTab ()
 Add export tab. More...
 
 infoScreen ()
 show information screen More...
 
 addInfoItems ($info)
 Add items to info screen. More...
 
- Public Member Functions inherited from ilObject2GUI
 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 delete ()
 Display delete confirmation form (repository/workspace switch) More...
 
 confirmedDelete ()
 Delete objects (repository/workspace switch) More...
 
 getHTML ()
 
 withReferences ()
 Final/Private declaration of unchanged parent methods. More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 isVisible ($a_ref_id, $a_type)
 
 trash ()
 
 undelete ()
 
 cancelDelete ()
 
 removeFromSystem ()
 
 cloneAll ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 Deleted in ilObject. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 Import. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 

Static Public Member Functions

static _goto ($a_target)
 Goto redirection. More...
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $a_obj, $a_callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Protected Member Functions

 getPlugin ()
 Get plugin object. More...
 
 txt ($a_var)
 Wrapper for txt function. More...
 
 getCreationFormTitle ($a_form_type)
 Use custom creation form titles. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 supportsCloning ()
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 supportsExport ()
 
 lookupParentTitleInCreationMode ()
 
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 assignObject ()
 create object instance as internal property (repository/workspace switch) More...
 
 getAccessHandler ()
 Get access handler. More...
 
 setLocator ()
 set Locator More...
 
 deleteConfirmation ()
 Display delete confirmation form (workspace specific) More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 showActions ()
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $nav_history
 
 $tabs
 
 $plugin_admin
 
 $plugin
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Additional Inherited Members

- Data Fields inherited from ilObject2GUI
 $tree
 
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

Definition at line 14 of file class.ilObjectPluginGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjectPluginGUI::__construct (   $a_ref_id = 0,
  $a_id_type = self::REPOSITORY_NODE_ID,
  $a_parent_node_id = 0 
)

Constructor.

Reimplemented from ilObject2GUI.

Reimplemented in ilOrgUnitExtensionGUI.

Definition at line 36 of file class.ilObjectPluginGUI.php.

37 {
38 global $DIC;
39
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);
50 $this->plugin = $this->getPlugin();
51 }
user()
Definition: user.php:4
getPlugin()
Get plugin object.
global $DIC
Definition: saml.php:7

References $DIC, getPlugin(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjectPluginGUI::_goto (   $a_target)
static

Goto redirection.

Definition at line 490 of file class.ilObjectPluginGUI.php.

491 {
492 global $DIC;
493
494 $ilCtrl = $DIC->ctrl();
495 $ilAccess = $DIC->access();
496 $lng = $DIC->language();
497
498 $t = explode("_", $a_target[0]);
499 $ref_id = (int) $t[0];
500 $class_name = $a_target[1];
501
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");
512 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
513 ilUtil::sendFailure(sprintf(
514 $lng->txt("msg_no_perm_read_item"),
516 ));
517 include_once("./Services/Object/classes/class.ilObjectGUI.php");
519 }
520 }
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilCtrl
Definition: ilias.php:18

References $DIC, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$ref_id, $t, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ addExportTab()

ilObjectPluginGUI::addExportTab ( )

Add export tab.

Definition at line 440 of file class.ilObjectPluginGUI.php.

441 {
442 // write
443 if ($this->access->checkAccess('write', "", $this->object->getRefId())) {
444 $this->tabs->addTarget(
445 'export',
446 $this->ctrl->getLinkTargetByClass("ilexportgui", ''),
447 'export',
448 'ilexportgui'
449 );
450 }
451 }

◆ addInfoItems()

ilObjectPluginGUI::addInfoItems (   $info)

Add items to info screen.

Parameters
ilInfoScreenGUI$info

Definition at line 483 of file class.ilObjectPluginGUI.php.

484 {
485 }

Referenced by infoScreen().

+ Here is the caller graph for this function:

◆ addInfoTab()

ilObjectPluginGUI::addInfoTab ( )

Add info screen tab.

Definition at line 398 of file class.ilObjectPluginGUI.php.

399 {
400 $ilAccess = $this->access;
401 $ilTabs = $this->tabs;
402
403 // info screen
404 if ($ilAccess->checkAccess('visible', "", $this->object->getRefId())) {
405 $ilTabs->addTarget(
406 "info_short",
407 $this->ctrl->getLinkTargetByClass(
408 "ilinfoscreengui",
409 "showSummary"
410 ),
411 "showSummary"
412 );
413 }
414 }

References ilObjectGUI\$access, and $tabs.

◆ addLocatorItems()

ilObjectPluginGUI::addLocatorItems ( )

Add object to locator.

Reimplemented from ilObject2GUI.

Definition at line 178 of file class.ilObjectPluginGUI.php.

179 {
180 $ilLocator = $this->locator;
181
182 if (!$this->getCreationMode()) {
183 $ilLocator->addItem(
184 $this->object->getTitle(),
185 $this->ctrl->getLinkTarget($this, $this->getStandardCmd()),
186 "",
187 $_GET["ref_id"]
188 );
189 }
190 }
$_GET["client_id"]
getCreationMode()
get creation mode

References $_GET, ilObjectGUI\$locator, and ilObject2GUI\getCreationMode().

+ Here is the call graph for this function:

◆ addPermissionTab()

ilObjectPluginGUI::addPermissionTab ( )

Add permission tab.

Definition at line 419 of file class.ilObjectPluginGUI.php.

420 {
421 $ilAccess = $this->access;
422 $ilTabs = $this->tabs;
424
425 // edit permissions
426 if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId())) {
427 $ilTabs->addTarget(
428 "perm_settings",
429 $ilCtrl->getLinkTargetByClass("ilpermissiongui", "perm"),
430 array("perm","info","owner"),
431 'ilpermissiongui'
432 );
433 }
434 }

References ilObjectGUI\$access, ilObjectGUI\$ctrl, $ilCtrl, and $tabs.

◆ afterSave()

ilObjectPluginGUI::afterSave ( ilObject  $newObj)

After saving @access public.

Reimplemented from ilObjectGUI.

Definition at line 373 of file class.ilObjectPluginGUI.php.

374 {
376 // always send a message
377 ilUtil::sendSuccess($this->lng->txt("object_added"), true);
378
379 $ilCtrl->initBaseClass("ilObjPluginDispatchGUI");
380 $ilCtrl->getCallStructure(strtolower("ilObjPluginDispatchGUI"));
381
382 $ilCtrl->setParameterByClass(get_class($this), "ref_id", $newObj->getRefId());
383 $ilCtrl->redirectByClass(array("ilobjplugindispatchgui", get_class($this)), $this->getAfterCreationCmd());
384 }
getAfterCreationCmd()
Cmd that will be redirected to after creation of a new object.
getRefId()
get reference id @access public

References ilObjectGUI\$ctrl, $ilCtrl, getAfterCreationCmd(), and ilObject\getRefId().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjectPluginGUI::executeCommand ( )

execute command

Reimplemented from ilObject2GUI.

Definition at line 56 of file class.ilObjectPluginGUI.php.

57 {
60 $ilAccess = $this->access;
62 $ilNavigationHistory = $this->nav_history;
63 $ilTabs = $this->tabs;
64
65 // get standard template (includes main menu and general layout)
66 $tpl->getStandardTemplate();
67
68 // set title
69 if (!$this->getCreationMode()) {
70 $tpl->setTitle($this->object->getTitle());
71 $tpl->setTitleIcon(ilObject::_getIcon($this->object->getId()));
72
73 // set tabs
74 if (strtolower($_GET["baseClass"]) != "iladministrationgui") {
75 $this->setTabs();
76 $this->setLocator();
77 } else {
78 $this->addAdminLocatorItems();
79 $tpl->setLocator();
80 $this->setAdminTabs();
81 }
82
83 if ($ilAccess->checkAccess('read', '', $this->object->getRefId())) {
84 $ilNavigationHistory->addItem(
85 $this->object->getRefId(),
86 ilLink::_getLink($this->object->getRefId(), $this->object->getType()),
87 $this->object->getType()
88 );
89 }
90 } else {
91 // show info of parent
92 $tpl->setTitle($this->lookupParentTitleInCreationMode());
93 $tpl->setTitleIcon(
94 ilObject::_getIcon(ilObject::_lookupObjId($_GET["ref_id"]), "big"),
95 $lng->txt("obj_" . ilObject::_lookupType($_GET["ref_id"], true))
96 );
97 $this->setLocator();
98 }
99
100 $next_class = $this->ctrl->getNextClass($this);
101 $cmd = $this->ctrl->getCmd();
102
103 switch ($next_class) {
104 case "ilinfoscreengui":
105 $this->checkPermission("visible");
106 $this->infoScreen(); // forwards command
107 break;
108
109 case 'ilpermissiongui':
110 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
111 $perm_gui = new ilPermissionGUI($this);
112 $ilTabs->setTabActive("perm_settings");
113 $ilCtrl->forwardCommand($perm_gui);
114 break;
115
116 case 'ilobjectcopygui':
117 include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
118 $cp = new ilObjectCopyGUI($this);
119 $cp->setType($this->getType());
120 $this->ctrl->forwardCommand($cp);
121 break;
122
123 case 'ilexportgui':
124 // only if plugin supports it?
125 $this->tabs->setTabActive("export");
126 include_once './Services/Export/classes/class.ilExportGUI.php';
127 $exp = new ilExportGUI($this);
128 $exp->addFormat('xml');
129 $this->ctrl->forwardCommand($exp);
130 break;
131
132 case 'illearningprogressgui':
133 $ilTabs->setTabActive("learning_progress");
134 include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
135 $new_gui = new ilLearningProgressGUI(
137 $this->object->getRefId(),
138 $_GET['user_id'] ? $_GET['user_id'] : $GLOBALS['ilUser']->getId()
139 );
140 $this->ctrl->forwardCommand($new_gui);
141 break;
142 case 'ilcommonactiondispatchergui':
143 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
145 $this->ctrl->forwardCommand($gui);
146 break;
147 default:
148 if ($this->getCreationMode() || $cmd == "save") {
149 $this->$cmd();
150 return;
151 }
152// if (strtolower($_GET["baseClass"]) == "iladministrationgui")
153// {
154// $this->viewObject();
155// return;
156// }
157 if (!$cmd) {
158 $cmd = $this->getStandardCmd();
159 }
160 if ($cmd == "infoScreen") {
161 $ilCtrl->setCmd("showSummary");
162 $ilCtrl->setCmdClass("ilinfoscreengui");
163 $this->infoScreen();
164 } else {
165 $this->performCommand($cmd);
166 }
167 break;
168 }
169
170 if (!$this->getCreationMode()) {
171 $tpl->show();
172 }
173 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Export User Interface Class.
Class ilObjUserTrackingGUI.
getType()
Functions that must be overwritten.
setTabs()
create tabs (repository/workspace switch)
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
setLocator()
set Locator
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
infoScreen()
show information screen
static _lookupType($a_id, $a_reference=false)
lookup object type
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.

References $_GET, ilObjectGUI\$access, ilObjectGUI\$ctrl, $GLOBALS, $ilCtrl, ilObjectGUI\$lng, $nav_history, $tabs, ilObjectGUI\$tpl, ilLink\_getLink(), ilObject\_lookupObjId(), ilObject\_lookupType(), ilObject2GUI\addAdminLocatorItems(), ilObject2GUI\checkPermission(), ilObject2GUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getStandardCmd(), ilObject2GUI\getType(), infoScreen(), lookupParentTitleInCreationMode(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ilObjectGUI\setAdminTabs(), ilObject2GUI\setLocator(), and ilObject2GUI\setTabs().

+ Here is the call graph for this function:

◆ getAfterCreationCmd()

ilObjectPluginGUI::getAfterCreationCmd ( )
abstract

Cmd that will be redirected to after creation of a new object.

Referenced by afterSave().

+ Here is the caller graph for this function:

◆ getCreationFormTitle()

ilObjectPluginGUI::getCreationFormTitle (   $a_form_type)
protected

Use custom creation form titles.

Parameters
string$a_form_type
Returns
string

Definition at line 228 of file class.ilObjectPluginGUI.php.

229 {
230 switch ($a_form_type) {
231 case self::CFORM_NEW:
232 return $this->txt($this->getType() . "_new");
233
235 return $this->lng->txt("import");
236
238 return $this->txt("objs_" . $this->getType() . "_duplicate");
239 }
240 }
txt($a_var)
Wrapper for txt function.

References ilObjectGUI\CFORM_CLONE, ilObjectGUI\CFORM_IMPORT, ilObjectGUI\CFORM_NEW, ilObject2GUI\getType(), and txt().

+ Here is the call graph for this function:

◆ getPlugin()

ilObjectPluginGUI::getPlugin ( )
protected

Get plugin object.

Returns
object plugin object
Exceptions
ilPluginException

Reimplemented in ilOrgUnitExtensionGUI.

Definition at line 197 of file class.ilObjectPluginGUI.php.

198 {
199 if (!$this->plugin) {
200 $this->plugin =
203 "Repository",
204 "robj",
205 ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $this->getType())
206 );
207 if (!is_object($this->plugin)) {
208 throw new ilPluginException("ilObjectPluginGUI: Could not instantiate plugin object for type " . $this->getType() . ".");
209 }
210 }
211 return $this->plugin;
212 }
const IL_COMP_SERVICE
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)

References $plugin, ilPlugin\getPluginObject(), ilObject2GUI\getType(), IL_COMP_SERVICE, and ilPlugin\lookupNameForId().

Referenced by __construct(), supportsExport(), and txt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStandardCmd()

ilObjectPluginGUI::getStandardCmd ( )
abstract

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ infoScreen()

ilObjectPluginGUI::infoScreen ( )

show information screen

Definition at line 456 of file class.ilObjectPluginGUI.php.

457 {
460 $ilTabs = $this->tabs;
461
462 $ilTabs->activateTab("info_short");
463
464 $this->checkPermission("visible");
465
466 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
467 $info = new ilInfoScreenGUI($this);
468 $info->enablePrivateNotes();
469
470 // general information
471 $lng->loadLanguageModule("meta");
472
473 $this->addInfoItems($info);
474
475 // forward the command
476 $ilCtrl->forwardCommand($info);
477 }
Class ilInfoScreenGUI.
addInfoItems($info)
Add items to info screen.
$info
Definition: index.php:5

References ilObjectGUI\$ctrl, $ilCtrl, $info, ilObjectGUI\$lng, $tabs, addInfoItems(), and ilObject2GUI\checkPermission().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCreateForm()

ilObjectPluginGUI::initCreateForm (   $a_new_type)

Init object creation form.

Parameters
string$a_new_type
Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

Definition at line 281 of file class.ilObjectPluginGUI.php.

282 {
283 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
284 $form = new ilPropertyFormGUI();
285 $form->setTarget("_top");
286 $form->setFormAction($this->ctrl->getFormAction($this, "save"));
287 $form->setTitle($this->txt($a_new_type . "_new"));
288
289 // title
290 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
291 $ti->setSize(min(40, ilObject::TITLE_LENGTH));
292 $ti->setMaxLength(ilObject::TITLE_LENGTH);
293 $ti->setRequired(true);
294 $form->addItem($ti);
295
296 // description
297 $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
298 $ta->setCols(40);
299 $ta->setRows(2);
300 $form->addItem($ta);
301
302 $form->addCommandButton("save", $this->txt($a_new_type . "_add"));
303 $form->addCommandButton("cancel", $this->lng->txt("cancel"));
304
305 return $form;
306 }
const TITLE_LENGTH
max length of object title
This class represents a property form user interface.
This class represents a text area property in a property form.
This class represents a text property in a property form.
if(isset($_POST['submit'])) $form

References $form, ilObject\TITLE_LENGTH, and txt().

Referenced by initCreationForms().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCreationForms()

ilObjectPluginGUI::initCreationForms (   $a_new_type)
protected

Init creation froms.

this will create the default creation forms: new, import, clone

Parameters
string$a_new_type
Returns
array

Reimplemented from ilObject2GUI.

Definition at line 250 of file class.ilObjectPluginGUI.php.

251 {
252 $ilPluginAdmin = $this->plugin_admin;
253
254 $forms = array();
255 $forms[self::CFORM_NEW] = $this->initCreateForm($a_new_type);
256
257 if ($this->supportsExport()) {
258 $forms[self::CFORM_IMPORT] = $this->initImportForm($a_new_type);
259 }
260 if ($this->supportsCloning()) {
261 $forms[self::CFORM_CLONE] = $this->fillCloneTemplate(null, $a_new_type);
262 }
263
264 return $forms;
265 }
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...
initImportForm($a_new_type)
Init object import form.
initCreateForm($a_new_type)
Init object creation form.

References $plugin_admin, ilObjectGUI\CFORM_CLONE, ilObjectGUI\CFORM_IMPORT, ilObjectGUI\CFORM_NEW, ilObject2GUI\fillCloneTemplate(), initCreateForm(), initImportForm(), supportsCloning(), and supportsExport().

+ Here is the call graph for this function:

◆ initEditForm()

ilObjectPluginGUI::initEditForm ( )

Init object update form.

Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

Definition at line 313 of file class.ilObjectPluginGUI.php.

314 {
317
318 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
319 $form = new ilPropertyFormGUI();
320 $form->setTarget("_top");
321 $form->setFormAction($ilCtrl->getFormAction($this, "update"));
322 $form->setTitle($lng->txt("edit"));
323
324 // title
325 $ti = new ilTextInputGUI($lng->txt("title"), "title");
326 $ti->setSize(min(40, ilObject::TITLE_LENGTH));
327 $ti->setMaxLength(ilObject::TITLE_LENGTH);
328 $ti->setRequired(true);
329 $form->addItem($ti);
330
331 // description
332 $ta = new ilTextAreaInputGUI($lng->txt("description"), "desc");
333 $ta->setCols(40);
334 $ta->setRows(2);
335 $form->addItem($ta);
336
337 $form->addCommandButton("update", $lng->txt("save"));
338 // $this->form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
339
340 return $form;
341 }

References ilObjectGUI\$ctrl, $form, $ilCtrl, ilObjectGUI\$lng, and ilObject\TITLE_LENGTH.

◆ initImportForm()

ilObjectPluginGUI::initImportForm (   $a_new_type)
protected

Init object import form.

Parameters
stringnew type
Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

Definition at line 349 of file class.ilObjectPluginGUI.php.

350 {
351 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
352 $form = new ilPropertyFormGUI();
353 $form->setTarget("_top");
354 $form->setFormAction($this->ctrl->getFormAction($this, "importFile"));
355 $form->setTitle($this->lng->txt("import"));
356
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);
361 $form->addItem($fi);
362
363 $form->addCommandButton("importFile", $this->lng->txt("import"));
364 $form->addCommandButton("cancel", $this->lng->txt("cancel"));
365
366 return $form;
367 }
This class represents a file property in a property form.

References $form.

Referenced by initCreationForms().

+ Here is the caller graph for this function:

◆ lookupParentTitleInCreationMode()

ilObjectPluginGUI::lookupParentTitleInCreationMode ( )
protected
Returns
mixed

Reimplemented in ilOrgUnitExtensionGUI.

Definition at line 537 of file class.ilObjectPluginGUI.php.

538 {
540 }

References $_GET, ilObject\_lookupObjId(), and ilObject\_lookupTitle().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ supportsCloning()

ilObjectPluginGUI::supportsCloning ( )
protected
Returns
bool returns true iff this plugin object supports cloning

Reimplemented in ilOrgUnitExtensionGUI.

Definition at line 270 of file class.ilObjectPluginGUI.php.

271 {
272 return true;
273 }

Referenced by initCreationForms().

+ Here is the caller graph for this function:

◆ supportsExport()

ilObjectPluginGUI::supportsExport ( )
protected
Returns
bool

Reimplemented in ilOrgUnitExtensionGUI.

Definition at line 526 of file class.ilObjectPluginGUI.php.

527 {
528 $ilPluginAdmin = $this->plugin_admin;
529
530 return $ilPluginAdmin->supportsExport(IL_COMP_SERVICE, "Repository", "robj", $this->getPlugin()->getPluginName());
531 }

References $plugin_admin, getPlugin(), and IL_COMP_SERVICE.

Referenced by initCreationForms().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ txt()

ilObjectPluginGUI::txt (   $a_var)
finalprotected

Wrapper for txt function.

Definition at line 217 of file class.ilObjectPluginGUI.php.

218 {
219 return $this->getPlugin()->txt($a_var);
220 }

References getPlugin().

Referenced by getCreationFormTitle(), and initCreateForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $nav_history

ilObjectPluginGUI::$nav_history
protected

Definition at line 19 of file class.ilObjectPluginGUI.php.

Referenced by executeCommand().

◆ $plugin

ilObjectPluginGUI::$plugin
protected

Definition at line 32 of file class.ilObjectPluginGUI.php.

Referenced by ilOrgUnitExtensionGUI\getPlugin(), and getPlugin().

◆ $plugin_admin

ilObjectPluginGUI::$plugin_admin
protected

Definition at line 29 of file class.ilObjectPluginGUI.php.

Referenced by initCreationForms(), and supportsExport().

◆ $tabs

ilObjectPluginGUI::$tabs
protected

The documentation for this class was generated from the following file: