ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObject2GUI Class Reference

New implementation of ilObjectGUI. More...

+ Inheritance diagram for ilObject2GUI:
+ Collaboration diagram for ilObject2GUI:

Public Member Functions

 __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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" 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...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 

Static Public Member Functions

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...
 

Data Fields

 $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
 

Protected Member Functions

 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...
 
 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
 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...
 
 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

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

Private Member Functions

 displayList ()
 

Detailed Description

New implementation of ilObjectGUI.

(beta)

Differences to the ilObject implementation:

  • no $this->tree anymore
  • no $this->formaction anymore
  • no $this->return_location anymore
  • no $this->target_frame anymore
  • no $this->actions anymore
  • no $this->sub_objects anymore
  • no $this->data anymore
  • no $this->prepare_output anymore

All new modules should derive from this class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 27 of file class.ilObject2GUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObject2GUI::__construct (   $a_id = 0,
  $a_id_type = self::REPOSITORY_NODE_ID,
  $a_parent_node_id = 0 
)

Constructor.

Parameters
int$a_id
int$a_id_type
int$a_parent_node_id

Definition at line 51 of file class.ilObject2GUI.php.

References $DIC, $ilCtrl, ilObjectGUI\$ilErr, $ilUser, ilObjectGUI\$lng, $node_id, ilObjectGUI\$objDefinition, $object_id, ilObjectGUI\$tpl, $tree, ilObject\_lookupObjectId(), afterConstructor(), assignObject(), getType(), ilWorkspaceTree\lookupObjectId(), PEAR_ERROR_CALLBACK, and user().

52  {
53  global $DIC;
54 
55  $objDefinition = $DIC["objDefinition"];
56  $tpl = $DIC["tpl"];
57  $ilCtrl = $DIC["ilCtrl"];
58  $ilErr = $DIC["ilErr"];
59  $lng = $DIC["lng"];
60  $ilTabs = $DIC["ilTabs"];
61  $tree = $DIC["tree"];
62  $ilAccess = $DIC["ilAccess"];
63  $this->object_service = $DIC->object();
64  $this->favourites = new ilFavouritesManager();
65 
66  if (!isset($ilErr)) {
67  $ilErr = new ilErrorHandling();
68  $ilErr->setErrorHandling(PEAR_ERROR_CALLBACK, array($ilErr,'errorHandler'));
69  } else {
70  $this->ilErr = $ilErr;
71  }
72 
73  $this->id_type = $a_id_type;
74  $this->parent_id = $a_parent_node_id;
75  $this->type = $this->getType();
76  $this->html = "";
77 
78  $this->tabs_gui = $ilTabs;
79  $this->objDefinition = $objDefinition;
80  $this->tpl = $tpl;
81  $this->ctrl = $ilCtrl;
82  $this->lng = $lng;
83 
84  // these are things that are initialised in ilObjectGUI constructor now
85  // and may miss here
86  $this->locator = $DIC["ilLocator"];
87  $this->user = $DIC->user();
88  $this->access = $DIC->access();
89  //$this->settings = $DIC->settings();
90  //$this->rbacreview = $DIC->rbac()->review();
91  $this->toolbar = $DIC->toolbar();
92 
93 
94  $params = array();
95  switch ($this->id_type) {
96  case self::REPOSITORY_NODE_ID:
97  $this->node_id = $a_id;
98  $this->object_id = ilObject::_lookupObjectId($this->node_id);
99  $this->tree = $tree;
100  $this->access_handler = $ilAccess;
101  $this->call_by_reference = true; // needed for prepareOutput()
102  $params[] = "ref_id";
103  break;
104 
105  case self::REPOSITORY_OBJECT_ID:
106  $this->object_id = $a_id;
107  $this->tree = $tree;
108  $this->access_handler = $ilAccess;
109  $params[] = "obj_id"; // ???
110  break;
111 
112  case self::WORKSPACE_NODE_ID:
113  $ilUser = $DIC["ilUser"];
114  $this->node_id = $a_id;
115  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
116  $this->tree = new ilWorkspaceTree($ilUser->getId());
117  $this->object_id = $this->tree->lookupObjectId($this->node_id);
118  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
119  $this->access_handler = new ilWorkspaceAccessHandler($this->tree);
120  $params[] = "wsp_id";
121  break;
122 
123  case self::WORKSPACE_OBJECT_ID:
124  $ilUser = $DIC["ilUser"];
125  $this->object_id = $a_id;
126  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
127  $this->tree = new ilWorkspaceTree($ilUser->getId());
128  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
129  $this->access_handler = new ilWorkspaceAccessHandler($this->tree);
130  $params[] = "obj_id"; // ???
131  break;
132 
133  case self::PORTFOLIO_OBJECT_ID:
134  $this->object_id = $a_id;
135  include_once('./Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php');
136  $this->access_handler = new ilPortfolioAccessHandler();
137  $params[] = "prt_id";
138  break;
139 
140  case self::OBJECT_ID:
141  $this->object_id = $a_id;
142  include_once "Services/Object/classes/class.ilDummyAccessHandler.php";
143  $this->access_handler = new ilDummyAccessHandler();
144  $params[] = "obj_id";
145  break;
146  }
147  $this->ctrl->saveParameter($this, $params);
148 
149 
150 
151  // old stuff for legacy code (obsolete?)
152  if (!$this->object_id) {
153  $this->creation_mode = true;
154  }
155  if ($this->node_id) {
156  // add parent node id if missing
157  if (!$this->parent_id && $this->tree) {
158  $this->parent_id = $this->tree->getParentId($this->node_id);
159  }
160  }
161  $this->ref_id = $this->node_id;
162  $this->obj_id = $this->object_id;
163 
164 
165 
166  $this->assignObject();
167 
168  // set context
169  if (is_object($this->object)) {
170  $this->ctrl->setContext($this->object->getId(), $this->object->getType());
171  }
172 
173  $this->afterConstructor();
174  }
const PEAR_ERROR_CALLBACK
Definition: PEAR.php:35
Access handler for personal workspace.
Manages favourites, currently the interface for other components, needs discussion.
user()
Definition: user.php:4
Tree handler for personal workspace.
static _lookupObjectId($a_ref_id)
lookup object id
global $ilCtrl
Definition: ilias.php:18
getType()
Functions that must be overwritten.
$ilUser
Definition: imgupload.php:18
lookupObjectId($a_node_id)
Get object id for node id.
Access handler for portfolio.
$DIC
Definition: xapitoken.php:46
afterConstructor()
Do anything that should be done after constructor in here.
assignObject()
create object instance as internal property (repository/workspace switch)
+ Here is the call graph for this function:

Member Function Documentation

◆ __initTableGUI()

& ilObject2GUI::__initTableGUI ( )
finalprotected

Definition at line 610 of file class.ilObject2GUI.php.

611  {
612  die("ilObject2GUI::__initTableGUI() is deprecated.");
613  }

◆ __setTableGUIBasicData()

ilObject2GUI::__setTableGUIBasicData ( $tbl,
$result_set,
  $a_from = "" 
)
finalprotected

Definition at line 614 of file class.ilObject2GUI.php.

615  {
616  die("ilObject2GUI::__setTableGUIBasicData() is deprecated.");
617  }

◆ __showButton()

ilObject2GUI::__showButton (   $a_cmd,
  $a_text,
  $a_target = '' 
)
finalprotected

Definition at line 602 of file class.ilObject2GUI.php.

603  {
604  die("ilObject2GUI::__showButton() is deprecated.");
605  }

◆ addAdminLocatorItems()

ilObject2GUI::addAdminLocatorItems (   $a_do_not_add_object = false)
finalprotected

Definition at line 515 of file class.ilObject2GUI.php.

Referenced by ilObjectPluginGUI\executeCommand().

516  {
517  return parent::addAdminLocatorItems($a_do_not_add_object);
518  }
+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObject2GUI::addLocatorItems ( )
protected

Functions to be overwritten.

Definition at line 622 of file class.ilObject2GUI.php.

References getType().

Referenced by setLocator().

623  {
624  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ afterConstructor()

ilObject2GUI::afterConstructor ( )
protected

Do anything that should be done after constructor in here.

Definition at line 179 of file class.ilObject2GUI.php.

Referenced by __construct().

180  {
181  }
+ Here is the caller graph for this function:

◆ assignObject()

ilObject2GUI::assignObject ( )
finalprotected

create object instance as internal property (repository/workspace switch)

Definition at line 218 of file class.ilObject2GUI.php.

References ilObjectFactory\getInstanceByObjId(), and ilObjectFactory\getInstanceByRefId().

Referenced by ilObjMainMenuGUI\__construct(), __construct(), and ilObjWorkflowEngineGUI\__construct().

219  {
220  if ($this->object_id != 0) {
221  switch ($this->id_type) {
222  case self::OBJECT_ID:
223  case self::REPOSITORY_OBJECT_ID:
224  case self::WORKSPACE_OBJECT_ID:
225  case self::PORTFOLIO_OBJECT_ID:
226  $this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
227  break;
228 
229  case self::REPOSITORY_NODE_ID:
230  $this->object = ilObjectFactory::getInstanceByRefId($this->node_id);
231  break;
232 
233  case self::WORKSPACE_NODE_ID:
234  // to be discussed
235  $this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
236  break;
237  }
238  }
239  }
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildCloneSelect()

ilObject2GUI::buildCloneSelect (   $existing_objs)
finalprotected

Definition at line 503 of file class.ilObject2GUI.php.

504  {
505  return parent::buildCloneSelect($existing_objs);
506  }

◆ cancel()

ilObject2GUI::cancel ( )

Definition at line 664 of file class.ilObject2GUI.php.

665  {
666  parent::cancelObject();
667  }

◆ cancelDelete()

ilObject2GUI::cancelDelete ( )
final

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

474  {
475  return parent::cancelDeleteObject();
476  } // ok

◆ checkPermission()

ilObject2GUI::checkPermission (   $a_perm,
  $a_cmd = "",
  $a_type = "",
  $a_ref_id = null 
)
finalprotected

Definition at line 453 of file class.ilObject2GUI.php.

References $a_type.

Referenced by ilObjHelpSettingsGUI\activateModule(), ilObjLinkResourceGUI\addLink(), ilObjMediaPoolGUI\allMedia(), ilObjMediaPoolGUI\bulkUpload(), ilObjLinkResourceGUI\confirmDeleteLink(), ilObjHelpSettingsGUI\confirmHelpModulesDeletion(), ilObjMediaPoolGUI\confirmRemove(), ilObjMediaPoolGUI\copyToClipboard(), ilObjMediaPoolGUI\createFolderForm(), ilObjMediaPoolGUI\createMediaFromUploadDir(), ilObjMediaPoolGUI\createMediaPoolPage(), ilObjLinkResourceGUI\deactivateLink(), ilObjHelpSettingsGUI\deactivateModule(), ilObjHelpSettingsGUI\deleteHelpModules(), ilObjLinkResourceGUI\deleteLinks(), ilObjLinkResourceGUI\deleteParameter(), ilObjLinkResourceGUI\deleteParameterForm(), ilObjMediaPoolGUI\editFolder(), ilObjLinkResourceGUI\editLink(), ilObjMediaPoolGUI\editMediaPoolPage(), ilObjContentPageGUI\editStyleProperties(), ilObjPortfolioBaseGUI\editStyleProperties(), ilObjBlogGUI\editStyleProperties(), ilObjMediaPoolGUI\editTitlesAndDescriptions(), ilObjLinkResourceGUI\executeCommand(), ilObjectPluginGUI\executeCommand(), ilObjCloudGUI\executeCommand(), ilObjPortfolioGUI\executeCommand(), ilObjMediaPoolGUI\executeCommand(), ilObjContentPageGUI\executeCommand(), ilObjLinkResourceGUI\history(), ilObjectPluginGUI\infoScreen(), ilObjPortfolioTemplateGUI\infoScreenForward(), ilObjBlogGUI\infoScreenForward(), ilObjLinkResourceGUI\infoScreenForward(), ilObjMediaPoolGUI\insertFromClipboard(), ilObjLinkResourceGUI\linkChecker(), ilObjItemGroupGUI\listMaterials(), ilObjMediaPoolGUI\listMedia(), ilObjLinkResourceGUI\manage(), ilObjMediaPoolGUI\openClipboard(), ilObjMediaPoolGUI\performBulkUpload(), ilObjMediaPoolGUI\remove(), ilObjLinkResourceGUI\saveAddLink(), ilObjContactAdministrationGUI\saveConfigurationForm(), ilObjMediaPoolGUI\saveFolder(), ilObjItemGroupGUI\saveItemAssignment(), ilObjMediaPoolGUI\saveMediaPoolPage(), ilObjLinkResourceGUI\saveSettings(), ilObjLinkResourceGUI\saveSorting(), ilObjContentPageGUI\saveStyleSettings(), ilObjMediaPoolGUI\saveTitlesAndDescriptions(), ilObjMediaPoolGUI\selectUploadDirFiles(), ilObjHelpSettingsGUI\setMode(), ilObjLinkResourceGUI\settings(), ilObjLinkResourceGUI\showLinks(), ilObjMediaPoolGUI\showMedia(), ilObjMediaPoolGUI\showMediaPoolPageUsages(), ilObjMediaPoolGUI\showPreview(), ilObjLinkResourceGUI\sort(), ilObjMediaPoolGUI\updateFolder(), ilObjLinkResourceGUI\updateLinks(), ilObjMediaPoolGUI\updateMediaPoolPage(), ilObjContentPageGUI\view(), and ilObjLinkResourceGUI\view().

454  {
455  return parent::checkPermission($a_perm, $a_cmd, $a_type, $a_ref_id);
456  }
$a_type
Definition: workflow.php:92
+ Here is the caller graph for this function:

◆ checkPermissionBool()

ilObject2GUI::checkPermissionBool (   $a_perm,
  $a_cmd = "",
  $a_type = "",
  $a_node_id = null 
)
protected

Check permission.

Parameters
string$a_perm
string$a_cmd
string$a_type
int$a_node_id
Returns
bool

Definition at line 805 of file class.ilObject2GUI.php.

References $a_type, $DIC, $ilUser, $node_id, $parent_id, and getAccessHandler().

Referenced by ilObjLinkResourceGUI\activateTabs(), ilObjWorkspaceFolderGUI\addContentSubTabs(), ilObjBlogGUI\addContributor(), ilObjContentPageGUI\addToNavigationHistory(), ilObjCloudGUI\asyncGetActionListContent(), ilObjCloudGUI\asyncGetBlock(), ilObjPollGUI\confirmDeleteAllVotes(), ilObjBlogGUI\contributors(), ilObjWorkspaceFolderGUI\cut(), ilObjBlogGUI\deactivateAdmin(), ilObjPollGUI\deleteAllVotes(), ilObjWorkspaceFolderGUI\deleteConfirmation(), ilObjPortfolioBaseGUI\deletePortfolioPages(), ilObjPortfolioBaseGUI\determinePageCall(), ilObjMediaPoolGUI\edit(), ilObjFileGUI\edit(), ilRemoteObjectBaseGUI\editObject(), ilObjBibliographicGUI\editObject(), ilObjDataCollectionGUI\editObject(), ilObjHelpSettingsGUI\editSettings(), ilObjFileGUI\executeCommand(), ilObjCloudGUI\executeCommand(), ilObjDataCollectionGUI\executeCommand(), ilObjContentPageGUI\executeCommand(), ilObjBlogGUI\executeCommand(), ilObjContactAdministrationGUI\getAdminTabs(), ilObjHelpSettingsGUI\getAdminTabs(), ilObjWikiSettingsGUI\getAdminTabs(), ilObjPDFGenerationGUI\getAdminTabs(), ilObjContactAdministrationGUI\getConfigurationForm(), ilObjContentPageGUI\getContent(), ilObjCloudGUI\getFile(), ilObjPDFGenerationGUI\hasWritePermission(), ilRemoteObjectBaseGUI\infoScreen(), ilObjPortfolioTemplateGUI\infoScreenForward(), ilObjCloudGUI\infoScreenForward(), ilObjDataCollectionGUI\infoScreenForward(), ilObjContentPageGUI\infoScreenForward(), ilObjCmiXapiGUI\infoScreenForward(), ilObjLTIConsumerGUI\infoScreenForward(), ilObjFileGUI\infoScreenForward(), ilObjBlogGUI\infoScreenForward(), ilObjLinkResourceGUI\infoScreenForward(), ilObjWikiSettingsGUI\initForm(), ilObjBlogGUI\isAdmin(), ilObjBlogGUI\mayContribute(), ilObjBlogGUI\mayEditPosting(), ilObjWorkspaceFolderGUI\performPasteIntoMultipleObjects(), ilObjPortfolioTemplateGUI\preview(), ilObjPortfolioBaseGUI\preview(), ilObjBlogGUI\preview(), ilObjPollGUI\render(), ilObjCloudGUI\render(), ilObjBlogGUI\render(), ilObjContentPageGUI\renderHeaderActions(), ilObjFileGUI\save(), ilObjPortfolioTemplateGUI\saveBlog(), ilObjPortfolioBaseGUI\savePage(), ilObjPortfolioBaseGUI\savePortfolioPagesOrdering(), ilObjPDFGenerationGUI\saveSettings(), ilObjFileGUI\saveUnzip(), ilObjFileGUI\sendFile(), ilObjContentPageGUI\setContentSubTabs(), ilObjHelpSettingsGUI\setMode(), ilObjContentPageGUI\setSettingsSubTabs(), ilRemoteObjectBaseGUI\setTabs(), ilObjPortfolioTemplateGUI\setTabs(), ilObjContentPageGUI\setTabs(), ilObjPollGUI\setTabs(), ilObjBlogGUI\setTabs(), setTabs(), ilObjFileGUI\setTabs(), ilObjLinkResourceGUI\setTabs(), ilObjPortfolioBaseGUI\showEditButton(), ilObjPollGUI\showParticipants(), ilObjPollGUI\showParticipantVotes(), ilObjLinkResourceGUI\showToolbar(), ilRemoteObjectBaseGUI\updateObject(), ilObjFileGUI\uploadFiles(), ilObjHelpSettingsGUI\uploadHelpFile(), and ilObjPortfolioBaseGUI\view().

806  {
807  global $DIC;
808 
809  $ilUser = $DIC["ilUser"];
810 
811 
812  if ($a_perm == "create") {
813  if (!$a_node_id) {
814  $a_node_id = $this->parent_id;
815  }
816  if ($a_node_id) {
817  return $this->getAccessHandler()->checkAccess($a_perm . "_" . $a_type, $a_cmd, $a_node_id);
818  }
819  } else {
820  if (!$a_node_id) {
821  $a_node_id = $this->node_id;
822  }
823  if ($a_node_id) {
824  return $this->getAccessHandler()->checkAccess($a_perm, $a_cmd, $a_node_id);
825  }
826  }
827 
828  // if we do not have a node id, check if current user is owner
829  if ($this->obj_id && $this->object->getOwner() == $ilUser->getId()) {
830  return true;
831  }
832  return false;
833  }
getAccessHandler()
Get access handler.
$a_type
Definition: workflow.php:92
$ilUser
Definition: imgupload.php:18
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneAll()

ilObject2GUI::cloneAll ( )
final

Definition at line 499 of file class.ilObject2GUI.php.

500  {
501  return parent::cloneAllObject();
502  }

◆ confirmedDelete()

ilObject2GUI::confirmedDelete ( )

Delete objects (repository/workspace switch)

Definition at line 331 of file class.ilObject2GUI.php.

References deleteConfirmedObjects().

332  {
333  switch ($this->id_type) {
334  case self::REPOSITORY_NODE_ID:
335  case self::REPOSITORY_OBJECT_ID:
336  return parent::confirmedDeleteObject();
337 
338  case self::WORKSPACE_NODE_ID:
339  case self::WORKSPACE_OBJECT_ID:
340  return $this->deleteConfirmedObjects();
341 
342  case self::OBJECT_ID:
343  case self::PORTFOLIO_OBJECT_ID:
344  // :TODO: should this ever occur?
345  break;
346  }
347  }
deleteConfirmedObjects()
Delete objects (workspace specific)
+ Here is the call graph for this function:

◆ create()

ilObject2GUI::create ( )

Deleted in ilObject.

CRUD

Definition at line 648 of file class.ilObject2GUI.php.

Referenced by ilObjTaxonomyGUI\createAssignedTaxonomy().

649  {
650  parent::createObject();
651  }
+ Here is the caller graph for this function:

◆ delete()

ilObject2GUI::delete ( )

Display delete confirmation form (repository/workspace switch)

Definition at line 309 of file class.ilObject2GUI.php.

310  {
311  switch ($this->id_type) {
312  case self::REPOSITORY_NODE_ID:
313  case self::REPOSITORY_OBJECT_ID:
314  return parent::deleteObject();
315 
316  case self::WORKSPACE_NODE_ID:
317  case self::WORKSPACE_OBJECT_ID:
318  return $this->deleteConfirmation();
319 
320  case self::OBJECT_ID:
321  case self::PORTFOLIO_OBJECT_ID:
322  // :TODO: should this ever occur?
323  break;
324  }
325  }

◆ deleteConfirmedObjects()

ilObject2GUI::deleteConfirmedObjects ( )
protected

Delete objects (workspace specific)

This should probably be moved elsewhere as done with RepUtil

Definition at line 354 of file class.ilObject2GUI.php.

References $_POST, $DIC, ilObjectGUI\$lng, $node_id, ilObjectGUI\$object, getAccessHandler(), ilObjectFactory\getInstanceByObjId(), and ilUtil\sendFailure().

Referenced by confirmedDelete().

355  {
356  global $DIC;
357 
358  $lng = $DIC["lng"];
359 
360 
361  if (sizeof($_POST["id"])) {
362  // #18797 - because of parent/child relations gather all nodes first
363  $del_nodes = array();
364  foreach ($_POST["id"] as $node_id) {
365  $del_nodes[$node_id] = $this->tree->getNodeData($node_id);
366  }
367 
368  foreach ($del_nodes as $node_id => $node) {
369  // tree/reference
370  $this->tree->deleteReference($node_id);
371  if ($this->tree->isInTree($node_id)) {
372  $this->tree->deleteTree($node);
373  }
374 
375  // permission
376  $this->getAccessHandler()->removePermission($node_id);
377 
378  // object
379  $object = ilObjectFactory::getInstanceByObjId($node["obj_id"], false);
380  if ($object) {
381  $object->delete();
382  }
383  }
384 
385  ilUtil::sendSuccess($lng->txt("msg_removed"), true);
386  } else {
387  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
388  }
389 
390  $this->ctrl->redirect($this, "");
391  }
getAccessHandler()
Get access handler.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$DIC
Definition: xapitoken.php:46
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayList()

ilObject2GUI::displayList ( )
private

Definition at line 509 of file class.ilObject2GUI.php.

510  {
511  return parent::displayList();
512  }

◆ edit()

ilObject2GUI::edit ( )

Definition at line 656 of file class.ilObject2GUI.php.

657  {
658  parent::editObject();
659  }

◆ executeCommand()

ilObject2GUI::executeCommand ( )

execute command

Definition at line 186 of file class.ilObject2GUI.php.

References getAccessHandler(), and prepareOutput().

Referenced by ilObjPortfolioTemplateGUI\executeCommand().

187  {
188  $next_class = $this->ctrl->getNextClass($this);
189  $cmd = $this->ctrl->getCmd();
190 
191  $this->prepareOutput();
192 
193  switch ($next_class) {
194  case "ilworkspaceaccessgui":
195  if ($this->node_id) {
196  $this->tabs_gui->activateTab("id_permissions");
197 
198  include_once('./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessGUI.php');
199  $wspacc = new ilWorkspaceAccessGUI($this->node_id, $this->getAccessHandler());
200  $this->ctrl->forwardCommand($wspacc);
201  break;
202  }
203 
204  // no break
205  default:
206  if (!$cmd) {
207  $cmd = "render";
208  }
209  return $this->$cmd();
210  }
211 
212  return true;
213  }
getAccessHandler()
Get access handler.
ACL access handler GUI.
prepareOutput($a_show_subobjects=true)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillCloneSearchTemplate()

ilObject2GUI::fillCloneSearchTemplate (   $a_tpl_varname,
  $a_type 
)
finalprotected

Definition at line 491 of file class.ilObject2GUI.php.

References $a_type.

492  {
493  return parent::fillCloneSearchTemplate($a_tpl_varname, $a_type);
494  }
$a_type
Definition: workflow.php:92

◆ fillCloneTemplate()

ilObject2GUI::fillCloneTemplate (   $a_tpl_varname,
  $a_type 
)
finalprotected

Definition at line 487 of file class.ilObject2GUI.php.

References $a_type.

Referenced by ilObjLTIConsumerGUI\initCreationForms(), ilObjFileGUI\initCreationForms(), and ilObjectPluginGUI\initCreationForms().

488  {
489  return parent::fillCloneTemplate($a_tpl_varname, $a_type);
490  }
$a_type
Definition: workflow.php:92
+ Here is the caller graph for this function:

◆ getAccessHandler()

◆ getCenterColumnHTML()

ilObject2GUI::getCenterColumnHTML ( )
finalprotected

Definition at line 441 of file class.ilObject2GUI.php.

442  {
443  return parent::getCenterColumnHTML();
444  }

◆ getCreationMode()

◆ getHTML()

ilObject2GUI::getHTML ( )

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

394  {
395  return parent::getHTML();
396  }

◆ getPermanentLinkWidget()

ilObject2GUI::getPermanentLinkWidget (   $a_append = null,
  $a_center = false 
)
protected

Definition at line 893 of file class.ilObject2GUI.php.

References getType().

Referenced by ilObjFileGUI\infoScreenForward(), ilObjBlogGUI\infoScreenForward(), and ilObjLinkResourceGUI\infoScreenForward().

894  {
895  if ($this->id_type == self::WORKSPACE_NODE_ID) {
896  $a_append .= "_wsp";
897  }
898 
899  include_once('Services/PermanentLink/classes/class.ilPermanentLinkGUI.php');
900  $plink = new ilPermanentLinkGUI($this->getType(), $this->node_id, $a_append);
901  $plink->setIncludePermanentLinkText(false);
902  $plink->setAlignCenter($a_center);
903  return $plink->getHTML();
904  }
Class for permanent links.
getType()
Functions that must be overwritten.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getReturnLocation()

ilObject2GUI::getReturnLocation (   $a_cmd,
  $a_location = "" 
)
finalprotected

Deprecated functions.

Definition at line 586 of file class.ilObject2GUI.php.

587  {
588  die("ilObject2GUI::getReturnLocation() is deprecated.");
589  }

◆ getRightColumnHTML()

ilObject2GUI::getRightColumnHTML ( )
finalprotected

Definition at line 445 of file class.ilObject2GUI.php.

446  {
447  return parent::getRightColumnHTML();
448  }

◆ getTabs()

ilObject2GUI::getTabs ( )
finalprotected

Definition at line 598 of file class.ilObject2GUI.php.

599  {
600  die("ilObject2GUI::getTabs() is deprecated.");
601  }

◆ getTargetFrame()

ilObject2GUI::getTargetFrame (   $a_cmd,
  $a_target_frame = "" 
)
finalprotected

Definition at line 429 of file class.ilObject2GUI.php.

Referenced by ilObjFileGUI\initMultiUploadForm(), ilObjFileGUI\initSingleUploadForm(), and ilObjFileGUI\initZipUploadForm().

430  {
431  return parent::getTargetFrame($a_cmd, $a_target_frame);
432  }
+ Here is the caller graph for this function:

◆ getType()

◆ handleAfterSaveCallback()

static ilObject2GUI::handleAfterSaveCallback ( ilObject  $a_obj,
  $a_callback_ref_id 
)
static

After creation callback.

Parameters
ilObject$a_obj
int$a_callback_ref_id

Definition at line 774 of file class.ilObject2GUI.php.

References $DIC, $location, ilObjectGUI\$objDefinition, and ilObject\_lookupType().

Referenced by ilObjFileGUI\uploadFiles().

775  {
776  global $DIC;
777 
778  $objDefinition = $DIC["objDefinition"];
779 
780 
781  $a_callback_ref_id = (int) $a_callback_ref_id;
782  if ($a_callback_ref_id) {
783  $callback_type = ilObject::_lookupType($a_callback_ref_id, true);
784  $class_name = "ilObj" . $objDefinition->getClassName($callback_type) . "GUI";
785  $location = $objDefinition->getLocation($callback_type);
786  include_once($location . "/class." . $class_name . ".php");
787  if (in_array(strtolower($class_name), array("ilobjitemgroupgui"))) {
788  $callback_obj = new $class_name($a_callback_ref_id);
789  } else {
790  $callback_obj = new $class_name(null, $a_callback_ref_id, true, false);
791  }
792  $callback_obj->afterSaveCallback($a_obj);
793  }
794  }
$location
Definition: buildRTE.php:44
static _lookupType($a_id, $a_reference=false)
lookup object type
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleAutoRating()

ilObject2GUI::handleAutoRating ( ilObject  $a_new_obj)
protected
Parameters
\ilObject$a_new_obj

Definition at line 910 of file class.ilObject2GUI.php.

Referenced by ilObjFileGUI\save(), ilObjLTIConsumerGUI\saveCustom(), and ilObjFileGUI\uploadFiles().

911  {
912  // only needed in repository
913  if ($this->id_type == self::REPOSITORY_NODE_ID) {
914  parent::handleAutoRating($a_new_obj);
915  }
916  }
+ Here is the caller graph for this function:

◆ hitsperpageObject()

ilObject2GUI::hitsperpageObject ( )
finalprotected

Definition at line 606 of file class.ilObject2GUI.php.

607  {
608  die("ilObject2GUI::hitsperpageObject() is deprecated.");
609  }

◆ importFile()

ilObject2GUI::importFile ( )

Import.

public

Definition at line 694 of file class.ilObject2GUI.php.

695  {
696  parent::importFileObject($this->parent_id);
697  }

◆ initCreationForms()

ilObject2GUI::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 677 of file class.ilObject2GUI.php.

678  {
679  $forms = parent::initCreationForms($a_new_type);
680 
681  // cloning doesn't work in workspace yet
682  if ($this->id_type == self::WORKSPACE_NODE_ID) {
683  unset($forms[self::CFORM_CLONE]);
684  }
685 
686  return $forms;
687  }

◆ initHeaderAction()

ilObject2GUI::initHeaderAction (   $a_sub_type = null,
  $a_sub_id = null 
)
protected

Add header action menu.

Parameters
string$a_sub_type
int$a_sub_id
Returns
ilObjectListGUI

Definition at line 842 of file class.ilObject2GUI.php.

References getAccessHandler(), getType(), and ilCommonActionDispatcherGUI\TYPE_WORKSPACE.

Referenced by ilObjCloudGUI\addHeaderAction().

843  {
844  if ($this->id_type == self::WORKSPACE_NODE_ID) {
845  if (!$this->creation_mode && $this->object_id) {
846  include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
847  $dispatcher = new ilCommonActionDispatcherGUI(
849  $this->getAccessHandler(),
850  $this->getType(),
851  $this->node_id,
852  $this->object_id
853  );
854 
855  $dispatcher->setSubObject($a_sub_type, $a_sub_id);
856 
857  include_once "Services/Object/classes/class.ilObjectListGUI.php";
858  ilObjectListGUI::prepareJSLinks(
859  $this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
860  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false),
861  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false)
862  );
863 
864  $lg = $dispatcher->initHeaderAction();
865 
866  if (is_object($lg)) {
867  // to enable add to desktop / remove from desktop
868  if ($this instanceof ilDesktopItemHandling) {
869  $lg->setContainerObject($this);
870  }
871 
872  // for activation checks see ilObjectGUI
873  // $lg->enableComments(true);
874  $lg->enableNotes(true);
875  // $lg->enableTags(true);
876  }
877 
878  return $lg;
879  }
880  } else {
881  return parent::initHeaderAction();
882  }
883  }
getAccessHandler()
Get access handler.
getType()
Functions that must be overwritten.
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
Class ilCommonActionDispatcherGUI.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isVisible()

ilObject2GUI::isVisible (   $a_ref_id,
  $a_type 
)
final

Definition at line 437 of file class.ilObject2GUI.php.

References $a_type.

438  {
439  return parent::isVisible($a_ref_id, $a_type);
440  }
$a_type
Definition: workflow.php:92

◆ omitLocator()

ilObject2GUI::omitLocator (   $a_omit = true)
finalprotected

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

426  {
427  return parent::omitLocator($a_omit);
428  }

◆ prepareOutput()

◆ putObjectInTree()

ilObject2GUI::putObjectInTree ( ilObject  $a_obj,
  $a_parent_node_id = null 
)

Add object to tree at given position.

Parameters
ilObject$a_obj
int$a_parent_node_id

Definition at line 705 of file class.ilObject2GUI.php.

References $DIC, $ilUser, $parent_id, ilObjectGUI\$rbacreview, ilChangeEvent\_recordWriteEvent(), ilRbacLog\add(), ilRbacLog\CREATE_OBJECT, ilObject\createReference(), ilRbacLog\gatherFaPa(), getAccessHandler(), ilObject\getId(), ilObject\getRefId(), ilObject\putInTree(), and ilObject\setPermissions().

Referenced by ilObjLTIConsumerGUI\createNewObject(), ilObjExerciseVerificationGUI\save(), ilObjCourseVerificationGUI\save(), ilObjLTIConsumerVerificationGUI\save(), ilObjSCORMVerificationGUI\save(), ilObjCmiXapiVerificationGUI\save(), ilObjTestVerificationGUI\save(), ilObjFileGUI\save(), and ilObjFileGUI\uploadFiles().

706  {
707  global $DIC;
708 
709  $rbacreview = $DIC["rbacreview"];
710  $ilUser = $DIC["ilUser"];
711 
712 
713  $this->object_id = $a_obj->getId();
714 
715  if (!$a_parent_node_id) {
716  $a_parent_node_id = $this->parent_id;
717  }
718 
719  // add new object to custom parent container
720  if ((int) $_REQUEST["crtptrefid"]) {
721  $a_parent_node_id = (int) $_REQUEST["crtptrefid"];
722  }
723 
724  switch ($this->id_type) {
725  case self::REPOSITORY_NODE_ID:
726  case self::REPOSITORY_OBJECT_ID:
727  if (!$this->node_id) {
728  $a_obj->createReference();
729  $this->node_id = $a_obj->getRefId();
730  }
731  $a_obj->putInTree($a_parent_node_id);
732  $a_obj->setPermissions($a_parent_node_id);
733 
734  // rbac log
735  include_once "Services/AccessControl/classes/class.ilRbacLog.php";
736  $rbac_log_roles = $rbacreview->getParentRoleIds($this->node_id, false);
737  $rbac_log = ilRbacLog::gatherFaPa($this->node_id, array_keys($rbac_log_roles), true);
738  ilRbacLog::add(ilRbacLog::CREATE_OBJECT, $this->node_id, $rbac_log);
739 
740  $this->ctrl->setParameter($this, "ref_id", $this->node_id);
741  break;
742 
743  case self::WORKSPACE_NODE_ID:
744  case self::WORKSPACE_OBJECT_ID:
745  if (!$this->node_id) {
746  $this->node_id = $this->tree->insertObject($a_parent_node_id, $this->object_id);
747  }
748  $this->getAccessHandler()->setPermissions($a_parent_node_id, $this->node_id);
749 
750  $this->ctrl->setParameter($this, "wsp_id", $this->node_id);
751  break;
752 
753  case self::OBJECT_ID:
754  case self::PORTFOLIO_OBJECT_ID:
755  // do nothing
756  break;
757  }
758 
759  // BEGIN ChangeEvent: Record save object.
760  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
761  ilChangeEvent::_recordWriteEvent($this->object_id, $ilUser->getId(), 'create');
762  // END ChangeEvent: Record save object.
763 
764  // use forced callback after object creation
765  self::handleAfterSaveCallback($a_obj, $_REQUEST["crtcb"]);
766  }
getAccessHandler()
Get access handler.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
createReference()
creates reference for object
const CREATE_OBJECT
getId()
get object id public
$ilUser
Definition: imgupload.php:18
putInTree($a_parent_ref)
maybe this method should be in tree object!?
static add($a_action, $a_ref_id, array $a_diff, $a_source_ref_id=false)
$DIC
Definition: xapitoken.php:46
getRefId()
get reference id public
setPermissions($a_parent_ref)
set permissions of object
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redirectToRefId()

ilObject2GUI::redirectToRefId (   $a_ref_id,
  $a_cmd = "" 
)
finalprotected

Definition at line 481 of file class.ilObject2GUI.php.

482  {
483  return parent::redirectToRefId();
484  } // ok

◆ redrawHeaderAction()

ilObject2GUI::redrawHeaderAction ( )
protected

Updating icons after ajax call.

Definition at line 888 of file class.ilObject2GUI.php.

889  {
890  parent::redrawHeaderActionObject();
891  }

◆ removeFromSystem()

ilObject2GUI::removeFromSystem ( )
final

Definition at line 477 of file class.ilObject2GUI.php.

478  {
479  return parent::removeFromSystemObject();
480  } // done

◆ save()

ilObject2GUI::save ( )

Definition at line 652 of file class.ilObject2GUI.php.

653  {
654  parent::saveObject();
655  }

◆ searchCloneSource()

ilObject2GUI::searchCloneSource ( )
finalprotected

Definition at line 495 of file class.ilObject2GUI.php.

496  {
497  return parent::searchCloneSourceObject();
498  }

◆ setColumnSettings()

ilObject2GUI::setColumnSettings ( ilColumnGUI  $column_gui)
finalprotected

Definition at line 449 of file class.ilObject2GUI.php.

450  {
451  return parent::setColumnSettings($column_gui);
452  }

◆ setCreationMode()

ilObject2GUI::setCreationMode (   $a_mode = true)
final

Definition at line 405 of file class.ilObject2GUI.php.

Referenced by ilObjMediaPoolGUI\executeCommand().

406  {
407  return parent::setCreationMode($a_mode);
408  }
+ Here is the caller graph for this function:

◆ setLocator()

ilObject2GUI::setLocator ( )
protected

set Locator

Definition at line 254 of file class.ilObject2GUI.php.

References $_GET, $DIC, $parent_id, ilObjectGUI\$ref_id, ilObjectGUI\$tpl, and addLocatorItems().

Referenced by ilObjectPluginGUI\executeCommand(), ilObjMediaPoolGUI\executeCommand(), ilObjContentPageGUI\executeCommand(), and ilObjBlogGUI\executeCommand().

255  {
256  global $DIC;
257 
258  $ilLocator = $DIC["ilLocator"];
259  $tpl = $DIC["tpl"];
260 
261  if ($this->omit_locator) {
262  return;
263  }
264 
265  switch ($this->id_type) {
266  case self::REPOSITORY_NODE_ID:
267  $ref_id = $this->node_id
268  ? $this->node_id
270  $ilLocator->addRepositoryItems($ref_id);
271 
272  // not so nice workaround: todo: handle $ilLocator as tabs in ilTemplate
273  if ($_GET["admin_mode"] == "" &&
274  strtolower($this->ctrl->getCmdClass()) == "ilobjrolegui") {
275  $this->ctrl->setParameterByClass(
276  "ilobjrolegui",
277  "rolf_ref_id",
278  $_GET["rolf_ref_id"]
279  );
280  $this->ctrl->setParameterByClass(
281  "ilobjrolegui",
282  "obj_id",
283  $_GET["obj_id"]
284  );
285  $ilLocator->addItem(
286  $this->lng->txt("role"),
287  $this->ctrl->getLinkTargetByClass(array("ilpermissiongui",
288  "ilobjrolegui"), "perm")
289  );
290  }
291 
292  // in workspace this is done in ilPersonalWorkspaceGUI
293  if ($this->object_id) {
294  $this->addLocatorItems();
295  }
296  $tpl->setLocator();
297 
298  break;
299 
300  case self::WORKSPACE_NODE_ID:
301  // :TODO:
302  break;
303  }
304  }
$_GET["client_id"]
$DIC
Definition: xapitoken.php:46
addLocatorItems()
Functions to be overwritten.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setReturnLocation()

ilObject2GUI::setReturnLocation (   $a_cmd,
  $a_location 
)
finalprotected

Definition at line 590 of file class.ilObject2GUI.php.

591  {
592  die("ilObject2GUI::setReturnLocation() is deprecated.");
593  }

◆ setTabs()

ilObject2GUI::setTabs ( )
protected

create tabs (repository/workspace switch)

this had to be moved here because of the context-specific permission tab

Definition at line 546 of file class.ilObject2GUI.php.

References $DIC, ilObjectGUI\$lng, $node_id, and checkPermissionBool().

Referenced by ilObjTaxonomyGUI\createTaxNode(), ilObjTaxonomyGUI\deleteItems(), ilObjTaxonomyGUI\editSettings(), ilObjectPluginGUI\executeCommand(), ilObjTaxonomyGUI\listAssignedItems(), ilObjTaxonomyGUI\listNodes(), ilObjTaxonomyGUI\moveItems(), ilObjBibliographicGUI\save(), and ilObjPortfolioTemplateGUI\setTabs().

547  {
548  global $DIC;
549 
550  $ilTabs = $DIC["ilTabs"];
551  $lng = $DIC["lng"];
552 
553 
554  switch ($this->id_type) {
555  case self::REPOSITORY_NODE_ID:
556  case self::REPOSITORY_OBJECT_ID:
557  if ($this->checkPermissionBool("edit_permission")) {
558  $ilTabs->addTab(
559  "id_permissions",
560  $lng->txt("perm_settings"),
561  $this->ctrl->getLinkTargetByClass(array(get_class($this), "ilpermissiongui"), "perm")
562  );
563  }
564  break;
565 
566  case self::WORKSPACE_NODE_ID:
567  case self::WORKSPACE_OBJECT_ID:
568  // only files and blogs can be shared for now
569  if ($this->checkPermissionBool("edit_permission") && in_array($this->type, array("file", "blog")) && $this->node_id) {
570  $ilTabs->addTab(
571  "id_permissions",
572  $lng->txt("wsp_permissions"),
573  $this->ctrl->getLinkTargetByClass(array(get_class($this), "ilworkspaceaccessgui"), "share")
574  );
575  }
576  break;
577  }
578  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTargetFrame()

ilObject2GUI::setTargetFrame (   $a_cmd,
  $a_target_frame 
)
finalprotected

Definition at line 433 of file class.ilObject2GUI.php.

434  {
435  return parent::setTargetFrame($a_cmd, $a_target_frame);
436  }

◆ setTitleAndDescription()

ilObject2GUI::setTitleAndDescription ( )
protected

Definition at line 417 of file class.ilObject2GUI.php.

418  {
419  return parent::setTitleAndDescription();
420  }

◆ showActions()

ilObject2GUI::showActions ( )
finalprotected

Definition at line 594 of file class.ilObject2GUI.php.

595  {
596  die("ilObject2GUI::showActions() is deprecated.");
597  }

◆ showPossibleSubObjects()

ilObject2GUI::showPossibleSubObjects ( )
finalprotected

Definition at line 459 of file class.ilObject2GUI.php.

460  {
461  return parent::showPossibleSubObjects();
462  }

◆ showUpperIcon()

ilObject2GUI::showUpperIcon ( )
finalprotected

Definition at line 421 of file class.ilObject2GUI.php.

422  {
423  return parent::showUpperIcon();
424  }

◆ trash()

ilObject2GUI::trash ( )
final

Definition at line 464 of file class.ilObject2GUI.php.

465  {
466  return parent::trashObject();
467  } // done

◆ undelete()

ilObject2GUI::undelete ( )
final

Definition at line 469 of file class.ilObject2GUI.php.

470  {
471  return parent::undeleteObject();
472  } // done

◆ update()

ilObject2GUI::update ( )

Definition at line 660 of file class.ilObject2GUI.php.

661  {
662  parent::updateObject();
663  }

◆ view()

ilObject2GUI::view ( )

view object content (repository/workspace switch)

Definition at line 523 of file class.ilObject2GUI.php.

524  {
525  switch ($this->id_type) {
526  case self::REPOSITORY_NODE_ID:
527  case self::REPOSITORY_OBJECT_ID:
528  return parent::viewObject();
529 
530  case self::WORKSPACE_NODE_ID:
531  case self::WORKSPACE_OBJECT_ID:
532  return $this->render();
533 
534  case self::OBJECT_ID:
535  case self::PORTFOLIO_OBJECT_ID:
536  // :TODO: should this ever occur? do nothing or edit() ?!
537  break;
538  }
539  }

◆ withReferences()

ilObject2GUI::withReferences ( )
final

Final/Private declaration of unchanged parent methods.

Definition at line 401 of file class.ilObject2GUI.php.

402  {
403  return parent::withReferences();
404  }

Field Documentation

◆ $access_handler

◆ $creation_forms

ilObject2GUI::$creation_forms = array()
protected

Definition at line 31 of file class.ilObject2GUI.php.

◆ $id_type

ilObject2GUI::$id_type = array()
protected

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

◆ $node_id

◆ $object_id

ilObject2GUI::$object_id
protected

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

Referenced by __construct().

◆ $parent_id

◆ $tree

◆ OBJECT_ID

const ilObject2GUI::OBJECT_ID = 0

Definition at line 37 of file class.ilObject2GUI.php.

Referenced by ilObjTaxonomyGUI\__construct().

◆ PORTFOLIO_OBJECT_ID

const ilObject2GUI::PORTFOLIO_OBJECT_ID = 5

Definition at line 42 of file class.ilObject2GUI.php.

Referenced by ilSharedResourceGUI\executeCommand().

◆ REPOSITORY_NODE_ID

◆ REPOSITORY_OBJECT_ID

const ilObject2GUI::REPOSITORY_OBJECT_ID = 3

Definition at line 40 of file class.ilObject2GUI.php.

◆ WORKSPACE_NODE_ID

◆ WORKSPACE_OBJECT_ID


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