ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 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)
 
 getCreationMode ()
 
 prepareOutput ($a_show_subobjects=true)
 
 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 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...
 

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 ()
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 
 setTargetFrame ($a_cmd, $a_target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 
 showActions ()
 
 getTabs ()
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 
 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
 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 public More...
 
 setAdminTabs ()
 set admin tabs 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
 
 $rbacsystem
 
 $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
 
 $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.

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

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

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  }
global $DIC
Definition: saml.php:7
user()
Definition: user.php:4
getPlugin()
Get plugin object.
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjectPluginGUI::_goto (   $a_target)
static

Goto redirection.

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

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

481  {
482  global $DIC;
483 
484  $ilCtrl = $DIC->ctrl();
485  $ilAccess = $DIC->access();
486  $lng = $DIC->language();
487 
488  $t = explode("_", $a_target[0]);
489  $ref_id = (int) $t[0];
490  $class_name = $a_target[1];
491 
492  if ($ilAccess->checkAccess("read", "", $ref_id)) {
493  $ilCtrl->initBaseClass("ilObjPluginDispatchGUI");
494  $ilCtrl->setTargetScript("ilias.php");
495  $ilCtrl->getCallStructure(strtolower("ilObjPluginDispatchGUI"));
496  $ilCtrl->setParameterByClass($class_name, "ref_id", $ref_id);
497  $ilCtrl->redirectByClass(array("ilobjplugindispatchgui", $class_name), "");
498  } elseif ($ilAccess->checkAccess("visible", "", $ref_id)) {
499  $ilCtrl->initBaseClass("ilObjPluginDispatchGUI");
500  $ilCtrl->setTargetScript("ilias.php");
501  $ilCtrl->getCallStructure(strtolower("ilObjPluginDispatchGUI"));
502  $ilCtrl->setParameterByClass($class_name, "ref_id", $ref_id);
503  $ilCtrl->redirectByClass(array("ilobjplugindispatchgui", $class_name), "infoScreen");
504  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
505  ilUtil::sendFailure(sprintf(
506  $lng->txt("msg_no_perm_read_item"),
508  ));
509  include_once("./Services/Object/classes/class.ilObjectGUI.php");
511  }
512  }
global $DIC
Definition: saml.php:7
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
global $ilCtrl
Definition: ilias.php:18
static _lookupObjId($a_id)
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ addInfoItems()

ilObjectPluginGUI::addInfoItems (   $info)

Add items to info screen.

Parameters
ilInfoScreenGUI$info

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

Referenced by infoScreen().

474  {
475  }
+ Here is the caller graph for this function:

◆ addInfoTab()

ilObjectPluginGUI::addInfoTab ( )

Add info screen tab.

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

References ilObjectGUI\$access, and $tabs.

405  {
406  $ilAccess = $this->access;
407  $ilTabs = $this->tabs;
408 
409  // info screen
410  if ($ilAccess->checkAccess('visible', "", $this->object->getRefId())) {
411  $ilTabs->addTarget(
412  "info_short",
413  $this->ctrl->getLinkTargetByClass(
414  "ilinfoscreengui",
415  "showSummary"
416  ),
417  "showSummary"
418  );
419  }
420  }

◆ addLocatorItems()

ilObjectPluginGUI::addLocatorItems ( )

Add object to locator.

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

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

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"]
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ addPermissionTab()

ilObjectPluginGUI::addPermissionTab ( )

Add permission tab.

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

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

426  {
427  $ilAccess = $this->access;
428  $ilTabs = $this->tabs;
430 
431  // edit permissions
432  if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId())) {
433  $ilTabs->addTarget(
434  "perm_settings",
435  $ilCtrl->getLinkTargetByClass("ilpermissiongui", "perm"),
436  array("perm","info","owner"),
437  'ilpermissiongui'
438  );
439  }
440  }
global $ilCtrl
Definition: ilias.php:18
Create styles array
The data for the language used.

◆ afterSave()

ilObjectPluginGUI::afterSave ( ilObject  $newObj)

After saving public.

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

References ilObjectGUI\$ctrl, $ilCtrl, array, getAfterCreationCmd(), ilObject\getRefId(), getStandardCmd(), and ilUtil\sendSuccess().

374  {
376  // always send a message
377  ilUtil::sendSuccess($this->lng->txt("object_added"), true);
378 
379  $ilCtrl->initBaseClass("ilObjPluginDispatchGUI");
380  $ilCtrl->setTargetScript("ilias.php");
381  $ilCtrl->getCallStructure(strtolower("ilObjPluginDispatchGUI"));
382 
383  //var_dump($ilCtrl->call_node);
384  //var_dump($ilCtrl->forward);
385  //var_dump($ilCtrl->parent);
386  //var_dump($ilCtrl->root_class);
387 
388  $ilCtrl->setParameterByClass(get_class($this), "ref_id", $newObj->getRefId());
389  $ilCtrl->redirectByClass(array("ilobjplugindispatchgui", get_class($this)), $this->getAfterCreationCmd());
390  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
getAfterCreationCmd()
Cmd that will be redirected to after creation of a new object.
Create styles array
The data for the language used.
getRefId()
get reference id public
+ Here is the call graph for this function:

◆ executeCommand()

ilObjectPluginGUI::executeCommand ( )

execute command

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

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

57  {
59  $tpl = $this->tpl;
60  $ilAccess = $this->access;
61  $lng = $this->lng;
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  // add entry to navigation history
84  if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
85  $ilNavigationHistory->addItem(
86  $_GET["ref_id"],
87  $ilCtrl->getLinkTarget($this, $this->getStandardCmd()),
88  $this->getType()
89  );
90  }
91  } else {
92  // show info of parent
93  $tpl->setTitle($this->lookupParentTitleInCreationMode());
94  $tpl->setTitleIcon(
96  $lng->txt("obj_" . ilObject::_lookupType($_GET["ref_id"], true))
97  );
98  $this->setLocator();
99  }
100 
101  $next_class = $this->ctrl->getNextClass($this);
102  $cmd = $this->ctrl->getCmd();
103 
104  switch ($next_class) {
105  case "ilinfoscreengui":
106  $this->checkPermission("visible");
107  $this->infoScreen(); // forwards command
108  break;
109 
110  case 'ilpermissiongui':
111  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
112  $perm_gui = new ilPermissionGUI($this);
113  $ilTabs->setTabActive("perm_settings");
114  $ilCtrl->forwardCommand($perm_gui);
115  break;
116 
117  case 'ilobjectcopygui':
118  include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
119  $cp = new ilObjectCopyGUI($this);
120  $cp->setType($this->getType());
121  $this->ctrl->forwardCommand($cp);
122  break;
123 
124  case 'ilexportgui':
125  // only if plugin supports it?
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 _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
setLocator()
set Locator
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
GUI class for the workflow of copying objects.
$_GET["client_id"]
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
global $ilCtrl
Definition: ilias.php:18
Export User Interface Class.
getType()
Functions that must be overwritten.
static _lookupObjId($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
setTabs()
create tabs (repository/workspace switch)
Create new PHPExcel object
obj_idprivate
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
addAdminLocatorItems($a_do_not_add_object=false)
infoScreen()
show information screen
Class ilObjUserTrackingGUI.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
setAdminTabs()
set admin tabs public
+ 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.

References ilObject2GUI\getType(), and txt().

229  {
230  switch ($a_form_type) {
231  case self::CFORM_NEW:
232  return $this->txt($this->getType() . "_new");
233 
234  case self::CFORM_IMPORT:
235  return $this->lng->txt("import");
236 
237  case self::CFORM_CLONE:
238  return $this->txt("objs_" . $this->getType() . "_duplicate");
239  }
240  }
txt($a_var)
Wrapper for txt function.
getType()
Functions that must be overwritten.
+ Here is the call graph for this function:

◆ getPlugin()

ilObjectPluginGUI::getPlugin ( )
protected

Get plugin object.

Returns
object plugin object
Exceptions
ilPluginException

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

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

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

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  }
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get plugin object.
getType()
Functions that must be overwritten.
static lookupNameForId($a_ctype, $a_cname, $a_slot_id, $a_plugin_id)
Lookup name for id.
const IL_COMP_SERVICE
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStandardCmd()

ilObjectPluginGUI::getStandardCmd ( )
abstract

Referenced by addLocatorItems(), afterSave(), and executeCommand().

+ Here is the caller graph for this function:

◆ infoScreen()

ilObjectPluginGUI::infoScreen ( )

show information screen

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

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

Referenced by executeCommand().

447  {
448  $lng = $this->lng;
450  $ilTabs = $this->tabs;
451 
452  $ilTabs->activateTab("info_short");
453 
454  $this->checkPermission("visible");
455 
456  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
457  $info = new ilInfoScreenGUI($this);
458  $info->enablePrivateNotes();
459 
460  // general information
461  $lng->loadLanguageModule("meta");
462 
463  $this->addInfoItems($info);
464 
465  // forward the command
466  $ilCtrl->forwardCommand($info);
467  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Class ilInfoScreenGUI.
addInfoItems($info)
Add items to info screen.
global $ilCtrl
Definition: ilias.php:18
$info
Definition: index.php:5
+ 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

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

References $form, ilTextAreaInputGUI\setCols(), ilTextInputGUI\setSize(), ilObject\TITLE_LENGTH, and txt().

Referenced by initCreationForms().

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  }
This class represents a property form user interface.
const TITLE_LENGTH
max length of object title
txt($a_var)
Wrapper for txt function.
if(isset($_POST['submit'])) $form
setSize($a_size)
Set Size.
This class represents a text property in a property form.
This class represents a text area property in a property form.
+ 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

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

References $plugin_admin, array, ilObject2GUI\fillCloneTemplate(), initCreateForm(), initImportForm(), supportsCloning(), and supportsExport().

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)
initImportForm($a_new_type)
Init object import form.
initCreateForm($a_new_type)
Init object creation form.
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ initEditForm()

ilObjectPluginGUI::initEditForm ( )

Init object update form.

Returns
ilPropertyFormGUI

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

References ilObjectGUI\$ctrl, $form, $ilCtrl, ilObjectGUI\$lng, ilTextAreaInputGUI\setCols(), ilTextInputGUI\setSize(), and ilObject\TITLE_LENGTH.

314  {
315  $lng = $this->lng;
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  }
This class represents a property form user interface.
const TITLE_LENGTH
max length of object title
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
setSize($a_size)
Set Size.
This class represents a text property in a property form.
This class represents a text area property in a property form.
+ Here is the call graph for this function:

◆ initImportForm()

ilObjectPluginGUI::initImportForm (   $a_new_type)
protected

Init object import form.

Parameters
stringnew type
Returns
ilPropertyFormGUI

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

References $form, array, and ilFileInputGUI\setSuffixes().

Referenced by initCreationForms().

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 property form user interface.
This class represents a file property in a property form.
if(isset($_POST['submit'])) $form
Create styles array
The data for the language used.
setSuffixes($a_suffixes)
Set Accepted Suffixes.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lookupParentTitleInCreationMode()

ilObjectPluginGUI::lookupParentTitleInCreationMode ( )
protected
Returns
mixed

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

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

Referenced by executeCommand().

530  {
532  }
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
static _lookupObjId($a_id)
+ 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

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

Referenced by initCreationForms().

271  {
272  return true;
273  }
+ Here is the caller graph for this function:

◆ supportsExport()

ilObjectPluginGUI::supportsExport ( )
protected
Returns
bool

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

References $plugin_admin, getPlugin(), and IL_COMP_SERVICE.

Referenced by initCreationForms().

519  {
520  $ilPluginAdmin = $this->plugin_admin;
521 
522  return $ilPluginAdmin->supportsExport(IL_COMP_SERVICE, "Repository", "robj", $this->getPlugin()->getPluginName());
523  }
getPlugin()
Get plugin object.
const IL_COMP_SERVICE
+ 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.

References getPlugin().

Referenced by getCreationFormTitle(), and initCreateForm().

218  {
219  return $this->getPlugin()->txt($a_var);
220  }
getPlugin()
Get plugin object.
+ 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: