ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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...
 
 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...
 
- 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...
 
 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...
 

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...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. 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)
 Activate rating automatically if parent container setting. More...
 
- Protected Member Functions inherited from ilObjectGUI
 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...
 
 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...
 
 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

 $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
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

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
 
 $ilias
 
 $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 21 of file class.ilObjectPluginGUI.php.

22 {
23 parent::__construct($a_ref_id, $a_id_type, $a_parent_node_id);
24 $this->plugin = $this->getPlugin();
25 }
getPlugin()
Get plugin object.

References getPlugin().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjectPluginGUI::_goto (   $a_target)
static

Goto redirection.

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

443 {
444 global $ilCtrl, $ilAccess, $lng;
445
446 $t = explode("_", $a_target[0]);
447 $ref_id = (int) $t[0];
448 $class_name = $a_target[1];
449
450 if ($ilAccess->checkAccess("read", "", $ref_id))
451 {
452 $ilCtrl->initBaseClass("ilObjPluginDispatchGUI");
453 $ilCtrl->setTargetScript("ilias.php");
454 $ilCtrl->getCallStructure(strtolower("ilObjPluginDispatchGUI"));
455 $ilCtrl->setParameterByClass($class_name, "ref_id", $ref_id);
456 $ilCtrl->redirectByClass(array("ilobjplugindispatchgui", $class_name), "");
457 }
458 else if($ilAccess->checkAccess("visible", "", $ref_id))
459 {
460 $ilCtrl->initBaseClass("ilObjPluginDispatchGUI");
461 $ilCtrl->setTargetScript("ilias.php");
462 $ilCtrl->getCallStructure(strtolower("ilObjPluginDispatchGUI"));
463 $ilCtrl->setParameterByClass($class_name, "ref_id", $ref_id);
464 $ilCtrl->redirectByClass(array("ilobjplugindispatchgui", $class_name), "infoScreen");
465 }
466 else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
467 {
468 ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
470 include_once("./Services/Object/classes/class.ilObjectGUI.php");
472 }
473 }
sprintf('%.4f', $callTime)
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 $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$ref_id, $t, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilUtil\sendFailure(), and sprintf.

+ Here is the call graph for this function:

◆ addInfoItems()

ilObjectPluginGUI::addInfoItems (   $info)

Add items to info screen.

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

436 {
437 }

Referenced by infoScreen().

+ Here is the caller graph for this function:

◆ addInfoTab()

ilObjectPluginGUI::addInfoTab ( )

Add info screen tab.

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

377 {
378 global $ilAccess, $ilTabs;
379
380 // info screen
381 if ($ilAccess->checkAccess('visible', "", $this->object->getRefId()))
382 {
383 $ilTabs->addTarget("info_short",
384 $this->ctrl->getLinkTargetByClass(
385 "ilinfoscreengui", "showSummary"),
386 "showSummary");
387 }
388 }

◆ addLocatorItems()

ilObjectPluginGUI::addLocatorItems ( )

Add object to locator.

Reimplemented from ilObject2GUI.

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

158 {
159 global $ilLocator;
160
161 if (!$this->getCreationMode())
162 {
163 $ilLocator->addItem($this->object->getTitle(),
164 $this->ctrl->getLinkTarget($this, $this->getStandardCmd()), "", $_GET["ref_id"]);
165 }
166 }
$_GET["client_id"]
getCreationMode()
get creation mode

References $_GET, and ilObject2GUI\getCreationMode().

+ Here is the call graph for this function:

◆ addPermissionTab()

ilObjectPluginGUI::addPermissionTab ( )

Add permission tab.

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

394 {
395 global $ilAccess, $ilTabs, $ilCtrl;
396
397 // edit permissions
398 if($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId()))
399 {
400 $ilTabs->addTarget("perm_settings",
401 $ilCtrl->getLinkTargetByClass("ilpermissiongui", "perm"),
402 array("perm","info","owner"), 'ilpermissiongui');
403 }
404 }

References $ilCtrl.

◆ afterSave()

ilObjectPluginGUI::afterSave ( ilObject  $newObj)

After saving @access public.

Reimplemented from ilObjectGUI.

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

346 {
347 global $ilCtrl;
348 // always send a message
349 ilUtil::sendSuccess($this->lng->txt("object_added"),true);
350
351 $ilCtrl->initBaseClass("ilObjPluginDispatchGUI");
352 $ilCtrl->setTargetScript("ilias.php");
353 $ilCtrl->getCallStructure(strtolower("ilObjPluginDispatchGUI"));
354
355//var_dump($ilCtrl->call_node);
356//var_dump($ilCtrl->forward);
357//var_dump($ilCtrl->parent);
358//var_dump($ilCtrl->root_class);
359
360 $ilCtrl->setParameterByClass(get_class($this), "ref_id", $newObj->getRefId());
361 $ilCtrl->redirectByClass(array("ilobjplugindispatchgui", get_class($this)), $this->getAfterCreationCmd());
362 }
getAfterCreationCmd()
Cmd that will be redirected to after creation of a new object.
getRefId()
get reference id @access public
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References $ilCtrl, getAfterCreationCmd(), ilObject\getRefId(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjectPluginGUI::executeCommand ( )

execute command

Reimplemented from ilObject2GUI.

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

31 {
32 global $ilCtrl, $tpl, $ilAccess, $lng, $ilNavigationHistory, $ilTabs;
33
34 // get standard template (includes main menu and general layout)
35 $tpl->getStandardTemplate();
36
37 // set title
38 if (!$this->getCreationMode())
39 {
40 $tpl->setTitle($this->object->getTitle());
41 $tpl->setTitleIcon(ilObject::_getIcon($this->object->getId()));
42
43 // set tabs
44 if (strtolower($_GET["baseClass"]) != "iladministrationgui")
45 {
46 $this->setTabs();
47 $this->setLocator();
48 }
49 else
50 {
51 $this->addAdminLocatorItems();
52 $tpl->setLocator();
53 $this->setAdminTabs();
54 }
55
56 // add entry to navigation history
57 if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
58 {
59 $ilNavigationHistory->addItem($_GET["ref_id"],
60 $ilCtrl->getLinkTarget($this, $this->getStandardCmd()), $this->getType());
61 }
62
63 }
64 else
65 {
66 // show info of parent
67 $tpl->setTitle($this->lookupParentTitleInCreationMode());
68 $tpl->setTitleIcon(
70 $lng->txt("obj_".ilObject::_lookupType($_GET["ref_id"], true)));
71 $this->setLocator();
72
73 }
74
75 $next_class = $this->ctrl->getNextClass($this);
76 $cmd = $this->ctrl->getCmd();
77
78 switch($next_class)
79 {
80 case "ilinfoscreengui":
81 $this->checkPermission("visible");
82 $this->infoScreen(); // forwards command
83 break;
84
85 case 'ilpermissiongui':
86 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
87 $perm_gui = new ilPermissionGUI($this);
88 $ilTabs->setTabActive("perm_settings");
89 $ilCtrl->forwardCommand($perm_gui);
90 break;
91
92 case 'ilobjectcopygui':
93 include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
94 $cp = new ilObjectCopyGUI($this);
95 $cp->setType($this->getType());
96 $this->ctrl->forwardCommand($cp);
97 break;
98
99 case 'ilexportgui':
100 // only if plugin supports it?
101 include_once './Services/Export/classes/class.ilExportGUI.php';
102 $exp = new ilExportGUI($this);
103 $exp->addFormat('xml');
104 $this->ctrl->forwardCommand($exp);
105 break;
106
107 case 'illearningprogressgui':
108 $ilTabs->setTabActive("learning_progress");
109 include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
111 $this->object->getRefId(),
112 $_GET['user_id'] ? $_GET['user_id'] : $GLOBALS['ilUser']->getId());
113 $this->ctrl->forwardCommand($new_gui);
114 break;
115 case 'ilcommonactiondispatchergui':
116 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
118 $this->ctrl->forwardCommand($gui);
119 break;
120 default:
121 if ($this->getCreationMode() || $cmd == "save")
122 {
123 $this->$cmd();
124 return;
125 }
126// if (strtolower($_GET["baseClass"]) == "iladministrationgui")
127// {
128// $this->viewObject();
129// return;
130// }
131 if(!$cmd)
132 {
133 $cmd = $this->getStandardCmd();
134 }
135 if ($cmd == "infoScreen")
136 {
137 $ilCtrl->setCmd("showSummary");
138 $ilCtrl->setCmdClass("ilinfoscreengui");
139 $this->infoScreen();
140 }
141 else
142 {
143 $this->performCommand($cmd);
144 }
145 break;
146 }
147
148 if (!$this->getCreationMode())
149 {
150 $tpl->show();
151 }
152 }
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 _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
$cmd
Definition: sahs_server.php:35

References $_GET, $cmd, $GLOBALS, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObject\_getIcon(), ilObject\_lookupObjId(), 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 200 of file class.ilObjectPluginGUI.php.

201 {
202 switch($a_form_type)
203 {
204 case self::CFORM_NEW:
205 return $this->txt($this->getType()."_new");
206
208 return $this->lng->txt("import");
209
211 return $this->txt("objs_".$this->getType()."_duplicate");
212 }
213 }
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 173 of file class.ilObjectPluginGUI.php.

174 {
175 if(!$this->plugin) {
176 $this->plugin =
177 ilPlugin::getPluginObject(IL_COMP_SERVICE, "Repository", "robj",
178 ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $this->getType()));
179 if (!is_object($this->plugin)) {
180 throw new ilPluginException("ilObjectPluginGUI: Could not instantiate plugin object for type " . $this->getType() . ".");
181 }
182 }
183 return $this->plugin;
184 }
const IL_COMP_SERVICE
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get plugin object.
static lookupNameForId($a_ctype, $a_cname, $a_slot_id, $a_plugin_id)
Lookup name for id.

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 410 of file class.ilObjectPluginGUI.php.

411 {
412 global $ilAccess, $ilUser, $lng, $ilCtrl, $tpl, $ilTabs;
413
414 $ilTabs->setTabActive("info_short");
415
416 $this->checkPermission("visible");
417
418 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
419 $info = new ilInfoScreenGUI($this);
420 $info->enablePrivateNotes();
421
422 // general information
423 $lng->loadLanguageModule("meta");
424
425 $this->addInfoItems($info);
426
427 // forward the command
428 $ret = $ilCtrl->forwardCommand($info);
429 //$tpl->setContent($ret);
430 }
Class ilInfoScreenGUI.
addInfoItems($info)
Add items to info screen.
$info
Definition: example_052.php:80
$ret
Definition: parser.php:6
$ilUser
Definition: imgupload.php:18

References $ilCtrl, $ilUser, $info, ilObjectGUI\$lng, $ret, ilObjectGUI\$tpl, 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 254 of file class.ilObjectPluginGUI.php.

255 {
256 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
257 $form = new ilPropertyFormGUI();
258 $form->setTarget("_top");
259 $form->setFormAction($this->ctrl->getFormAction($this, "save"));
260 $form->setTitle($this->txt($a_new_type."_new"));
261
262 // title
263 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
264 $ti->setSize(min(40, ilObject::TITLE_LENGTH));
265 $ti->setMaxLength(ilObject::TITLE_LENGTH);
266 $ti->setRequired(true);
267 $form->addItem($ti);
268
269 // description
270 $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
271 $ta->setCols(40);
272 $ta->setRows(2);
273 $form->addItem($ta);
274
275 $form->addCommandButton("save", $this->txt($a_new_type."_add"));
276 $form->addCommandButton("cancel", $this->lng->txt("cancel"));
277
278 return $form;
279 }
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.

References 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 223 of file class.ilObjectPluginGUI.php.

224 {
225 global $ilPluginAdmin;
226
227 $forms = array();
228 $forms[self::CFORM_NEW] = $this->initCreateForm($a_new_type);
229
230 if($this->supportsExport())
231 {
232 $forms[self::CFORM_IMPORT] = $this->initImportForm($a_new_type);
233 }
234 if($this->supportsCloning()) {
235 $forms[self::CFORM_CLONE] = $this->fillCloneTemplate(null, $a_new_type);
236 }
237
238 return $forms;
239 }
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 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 286 of file class.ilObjectPluginGUI.php.

287 {
288 global $lng, $ilCtrl;
289
290 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
291 $form = new ilPropertyFormGUI();
292 $form->setTarget("_top");
293 $form->setFormAction($ilCtrl->getFormAction($this, "update"));
294 $form->setTitle($lng->txt("edit"));
295
296 // title
297 $ti = new ilTextInputGUI($lng->txt("title"), "title");
298 $ti->setSize(min(40, ilObject::TITLE_LENGTH));
299 $ti->setMaxLength(ilObject::TITLE_LENGTH);
300 $ti->setRequired(true);
301 $form->addItem($ti);
302
303 // description
304 $ta = new ilTextAreaInputGUI($lng->txt("description"), "desc");
305 $ta->setCols(40);
306 $ta->setRows(2);
307 $form->addItem($ta);
308
309 $form->addCommandButton("update", $lng->txt("save"));
310 // $this->form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
311
312 return $form;
313 }

References $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 321 of file class.ilObjectPluginGUI.php.

322 {
323 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
324 $form = new ilPropertyFormGUI();
325 $form->setTarget("_top");
326 $form->setFormAction($this->ctrl->getFormAction($this, "importFile"));
327 $form->setTitle($this->lng->txt("import"));
328
329 include_once("./Services/Form/classes/class.ilFileInputGUI.php");
330 $fi = new ilFileInputGUI($this->lng->txt("import_file"), "importfile");
331 $fi->setSuffixes(array("zip"));
332 $fi->setRequired(true);
333 $form->addItem($fi);
334
335 $form->addCommandButton("importFile", $this->lng->txt("import"));
336 $form->addCommandButton("cancel", $this->lng->txt("cancel"));
337
338 return $form;
339 }
This class represents a file property in a property form.

Referenced by initCreationForms().

+ Here is the caller graph for this function:

◆ lookupParentTitleInCreationMode()

ilObjectPluginGUI::lookupParentTitleInCreationMode ( )
protected
Returns
mixed

Reimplemented in ilOrgUnitExtensionGUI.

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

489 {
491 }

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 244 of file class.ilObjectPluginGUI.php.

244 {
245 return true;
246 }

Referenced by initCreationForms().

+ Here is the caller graph for this function:

◆ supportsExport()

ilObjectPluginGUI::supportsExport ( )
protected
Returns
bool

Reimplemented in ilOrgUnitExtensionGUI.

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

479 {
480 global $ilPluginAdmin;
481
482 return $ilPluginAdmin->supportsExport(IL_COMP_SERVICE, "Repository", "robj", $this->getPlugin()->getPluginName());
483 }

References 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 189 of file class.ilObjectPluginGUI.php.

190 {
191 return $this->getPlugin()->txt($a_var);
192 }

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

◆ $plugin

ilObjectPluginGUI::$plugin
protected

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

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


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