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

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

 $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
 

Private Member Functions

 displayList ()
 

Detailed Description

New implementation of ilObjectGUI.

(beta)

Differences to the ilObject implementation:

  • no $this->ilias anymore
  • 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 28 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 52 of file class.ilObject2GUI.php.

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

53  {
54  global $objDefinition, $tpl, $ilCtrl, $ilErr, $lng, $ilTabs, $tree, $ilAccess;
55 
56  if (!isset($ilErr))
57  {
58  $ilErr = new ilErrorHandling();
59  $ilErr->setErrorHandling(PEAR_ERROR_CALLBACK,array($ilErr,'errorHandler'));
60  }
61  else
62  {
63  $this->ilErr =& $ilErr;
64  }
65 
66  $this->id_type = $a_id_type;
67  $this->parent_id = $a_parent_node_id;
68  $this->type = $this->getType();
69  $this->html = "";
70 
71  // use globals instead?
72  $this->tabs_gui = $ilTabs;
73  $this->objDefinition = $objDefinition;
74  $this->tpl = $tpl;
75  $this->ctrl = $ilCtrl;
76  $this->lng = $lng;
77 
78  $params = array();
79  switch($this->id_type)
80  {
81  case self::REPOSITORY_NODE_ID:
82  $this->node_id = $a_id;
83  $this->object_id = ilObject::_lookupObjectId($this->node_id);
84  $this->tree = $tree;
85  $this->access_handler = $ilAccess;
86  $this->call_by_reference = true; // needed for prepareOutput()
87  $params[] = "ref_id";
88  break;
89 
90  case self::REPOSITORY_OBJECT_ID:
91  $this->object_id = $a_id;
92  $this->tree = $tree;
93  $this->access_handler = $ilAccess;
94  $params[] = "obj_id"; // ???
95  break;
96 
97  case self::WORKSPACE_NODE_ID:
98  global $ilUser;
99  $this->node_id = $a_id;
100  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
101  $this->tree = new ilWorkspaceTree($ilUser->getId());
102  $this->object_id = $this->tree->lookupObjectId($this->node_id);
103  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
104  $this->access_handler = new ilWorkspaceAccessHandler($this->tree);
105  $params[] = "wsp_id";
106  break;
107 
108  case self::WORKSPACE_OBJECT_ID:
109  global $ilUser;
110  $this->object_id = $a_id;
111  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
112  $this->tree = new ilWorkspaceTree($ilUser->getId());
113  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
114  $this->access_handler = new ilWorkspaceAccessHandler($this->tree);
115  $params[] = "obj_id"; // ???
116  break;
117 
118  case self::PORTFOLIO_OBJECT_ID:
119  $this->object_id = $a_id;
120  include_once('./Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php');
121  $this->access_handler = new ilPortfolioAccessHandler();
122  $params[] = "prt_id";
123  break;
124 
125  case self::OBJECT_ID:
126  $this->object_id = $a_id;
127  include_once "Services/Object/classes/class.ilDummyAccessHandler.php";
128  $this->access_handler = new ilDummyAccessHandler();
129  $params[] = "obj_id";
130  break;
131  }
132  $this->ctrl->saveParameter($this, $params);
133 
134 
135 
136  // old stuff for legacy code (obsolete?)
137  if(!$this->object_id)
138  {
139  $this->creation_mode = true;
140  }
141  if($this->node_id)
142  {
143  // add parent node id if missing
144  if(!$this->parent_id && $this->tree)
145  {
146  $this->parent_id = $this->tree->getParentId($this->node_id);
147  }
148  }
149  $this->ref_id = $this->node_id;
150  $this->obj_id = $this->object_id;
151 
152 
153 
154  $this->assignObject();
155 
156  // set context
157  if (is_object($this->object))
158  {
159  $this->ctrl->setContext($this->object->getId(), $this->object->getType());
160  }
161 
162  $this->afterConstructor();
163  }
global $ilErr
Definition: raiseError.php:16
const PEAR_ERROR_CALLBACK
Definition: PEAR.php:35
Access handler for personal workspace.
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
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
lookupObjectId($a_node_id)
Get object id for node id.
Access handler for portfolio.
afterConstructor()
Do anything that should be done after constructor in here.
assignObject()
create object instance as internal property (repository/workspace switch)
$params
Definition: example_049.php:96
+ Here is the call graph for this function:

Member Function Documentation

◆ __initTableGUI()

& ilObject2GUI::__initTableGUI ( )
finalprotected

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

556 { die("ilObject2GUI::__initTableGUI() is deprecated."); }

◆ __setTableGUIBasicData()

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

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

557 { die("ilObject2GUI::__setTableGUIBasicData() is deprecated."); }

◆ __showButton()

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

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

554 { die("ilObject2GUI::__showButton() is deprecated."); }

◆ addAdminLocatorItems()

ilObject2GUI::addAdminLocatorItems (   $a_do_not_add_object = false)
finalprotected

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

Referenced by ilObjectPluginGUI\executeCommand().

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

◆ addLocatorItems()

ilObject2GUI::addLocatorItems ( )
protected

Functions to be overwritten.

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

References getType().

Referenced by setLocator().

562 {}
+ 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 168 of file class.ilObject2GUI.php.

Referenced by __construct().

169  {
170  }
+ Here is the caller graph for this function:

◆ assignObject()

ilObject2GUI::assignObject ( )
finalprotected

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

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

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

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

212  {
213  if ($this->object_id != 0)
214  {
215  switch($this->id_type)
216  {
217  case self::OBJECT_ID:
218  case self::REPOSITORY_OBJECT_ID:
219  case self::WORKSPACE_OBJECT_ID:
220  case self::PORTFOLIO_OBJECT_ID:
221  $this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
222  break;
223 
224  case self::REPOSITORY_NODE_ID:
225  $this->object = ilObjectFactory::getInstanceByRefId($this->node_id);
226  break;
227 
228  case self::WORKSPACE_NODE_ID:
229  // to be discussed
230  $this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
231  break;
232  }
233  }
234  }
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 480 of file class.ilObject2GUI.php.

480 { return parent::buildCloneSelect($existing_objs); }

◆ cancel()

ilObject2GUI::cancel ( )

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

590 { parent::cancelObject(); }

◆ cancelDelete()

ilObject2GUI::cancelDelete ( )
final

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

471 { return parent::cancelDeleteObject(); } // ok

◆ checkPermission()

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

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

References $a_type.

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

463 { return parent::checkPermission($a_perm, $a_cmd, $a_type, $a_ref_id); }
$a_type
Definition: workflow.php:93
+ 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 731 of file class.ilObject2GUI.php.

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

Referenced by ilObjLinkResourceGUI\activateTabs(), ilObjBlogGUI\addContributor(), ilObjCloudGUI\asyncGetActionListContent(), ilObjCloudGUI\asyncGetBlock(), ilObjPollGUI\confirmDeleteAllVotes(), ilObjFileGUI\confirmDeleteFile(), ilObjFileGUI\confirmDeleteVersions(), ilObjBlogGUI\contributors(), ilObjWorkspaceFolderGUI\cut(), ilObjBlogGUI\deactivateAdmin(), ilObjPollGUI\deleteAllVotes(), deleteConfirmation(), ilObjPortfolioBaseGUI\deletePortfolioPages(), ilObjPortfolioBaseGUI\determinePageCall(), ilObjFileGUI\edit(), ilRemoteObjectBaseGUI\editObject(), ilObjHelpSettingsGUI\editSettings(), ilObjWikiSettingsGUI\editSettings(), ilObjFileGUI\executeCommand(), ilObjCloudGUI\executeCommand(), ilObjBlogGUI\executeCommand(), ilObjContactAdministrationGUI\getAdminTabs(), ilObjHelpSettingsGUI\getAdminTabs(), ilObjWikiSettingsGUI\getAdminTabs(), ilObjContactAdministrationGUI\getConfigurationForm(), ilObjCloudGUI\getFile(), ilObjDataCollectionGUI\getType(), ilObjFileGUI\handleFileUpload(), ilRemoteObjectBaseGUI\infoScreen(), ilObjBibliographicGUI\infoScreenForward(), ilObjPortfolioTemplateGUI\infoScreenForward(), ilObjCloudGUI\infoScreenForward(), ilObjDataCollectionGUI\infoScreenForward(), ilObjFileGUI\infoScreenForward(), ilObjBlogGUI\infoScreenForward(), ilObjWikiSettingsGUI\initForm(), ilObjBlogGUI\isAdmin(), ilObjBlogGUI\mayContribute(), ilObjBlogGUI\mayEditPosting(), ilObjWorkspaceFolderGUI\performPasteIntoMultipleObjects(), ilObjPortfolioTemplateGUI\preview(), ilObjPortfolioBaseGUI\preview(), ilObjBlogGUI\preview(), ilObjPollGUI\render(), ilObjCloudGUI\render(), ilObjBlogGUI\render(), ilObjFileGUI\rollbackVersion(), ilObjFileGUI\save(), ilObjPortfolioTemplateGUI\saveBlog(), ilObjPortfolioBaseGUI\savePage(), ilObjPortfolioBaseGUI\savePortfolioPagesOrdering(), ilObjFileGUI\saveUnzip(), ilObjFileGUI\sendFile(), ilObjHelpSettingsGUI\setMode(), ilObjWorkspaceFolderGUI\setTabs(), ilRemoteObjectBaseGUI\setTabs(), ilObjPortfolioTemplateGUI\setTabs(), ilObjPollGUI\setTabs(), ilObjBlogGUI\setTabs(), setTabs(), ilObjFileGUI\setTabs(), ilObjLinkResourceGUI\setTabs(), ilObjPollGUI\showParticipants(), ilObjPollGUI\showParticipantVotes(), ilObjLinkResourceGUI\showToolbar(), ilRemoteObjectBaseGUI\updateObject(), ilObjFileGUI\uploadFiles(), ilObjHelpSettingsGUI\uploadHelpFile(), ilObjFileGUI\versions(), and ilObjPortfolioBaseGUI\view().

732  {
733  global $ilUser;
734 
735  if($a_perm == "create")
736  {
737  if(!$a_node_id)
738  {
739  $a_node_id = $this->parent_id;
740  }
741  if($a_node_id)
742  {
743  return $this->getAccessHandler()->checkAccess($a_perm."_".$a_type, $a_cmd, $a_node_id);
744  }
745  }
746  else
747  {
748 
749  if (!$a_node_id)
750  {
751  $a_node_id = $this->node_id;
752  }
753  if($a_node_id)
754  {
755  return $this->getAccessHandler()->checkAccess($a_perm, $a_cmd, $a_node_id);
756  }
757  }
758 
759  // if we do not have a node id, check if current user is owner
760  if($this->obj_id && $this->object->getOwner() == $ilUser->getId())
761  {
762  return true;
763  }
764  return false;
765  }
getAccessHandler()
Get access handler.
$a_type
Definition: workflow.php:93
$ilUser
Definition: imgupload.php:18
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneAll()

ilObject2GUI::cloneAll ( )
final

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

479 { return parent::cloneAllObject(); }

◆ confirmedDelete()

ilObject2GUI::confirmedDelete ( )

Delete objects (repository/workspace switch)

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

References deleteConfirmedObjects().

378  {
379  switch($this->id_type)
380  {
381  case self::REPOSITORY_NODE_ID:
382  case self::REPOSITORY_OBJECT_ID:
383  return parent::confirmedDeleteObject();
384 
385  case self::WORKSPACE_NODE_ID:
386  case self::WORKSPACE_OBJECT_ID:
387  return $this->deleteConfirmedObjects();
388 
389  case self::OBJECT_ID:
390  case self::PORTFOLIO_OBJECT_ID:
391  // :TODO: should this ever occur?
392  break;
393  }
394  }
deleteConfirmedObjects()
Delete objects (workspace specific)
+ Here is the call graph for this function:

◆ create()

ilObject2GUI::create ( )

Deleted in ilObject.

CRUD

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

Referenced by ilObjTaxonomyGUI\createAssignedTaxonomy().

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

◆ delete()

ilObject2GUI::delete ( )

Display delete confirmation form (repository/workspace switch)

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

References deleteConfirmation().

300  {
301  switch($this->id_type)
302  {
303  case self::REPOSITORY_NODE_ID:
304  case self::REPOSITORY_OBJECT_ID:
305  return parent::deleteObject();
306 
307  case self::WORKSPACE_NODE_ID:
308  case self::WORKSPACE_OBJECT_ID:
309  return $this->deleteConfirmation();
310 
311  case self::OBJECT_ID:
312  case self::PORTFOLIO_OBJECT_ID:
313  // :TODO: should this ever occur?
314  break;
315  }
316  }
deleteConfirmation()
Display delete confirmation form (workspace specific)
+ Here is the call graph for this function:

◆ deleteConfirmation()

ilObject2GUI::deleteConfirmation ( )
protected

Display delete confirmation form (workspace specific)

This should probably be moved elsewhere as done with RepUtil

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

References ilObjectGUI\$lng, $node_id, ilObjectGUI\$obj_id, ilObjectGUI\$objDefinition, $title, ilObjectGUI\$tpl, ilObject\_getIcon(), ilObject\_lookupType(), array, checkPermissionBool(), ilObjectFactory\getClassByType(), and ilUtil\sendFailure().

Referenced by delete().

324  {
325  global $lng, $tpl, $objDefinition;
326 
327  $node_id = (int)$_REQUEST["item_ref_id"];
328  if (!$node_id)
329  {
330  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
331  $this->ctrl->redirect($this, "");
332  }
333 
334  // on cancel or fail we return to parent node
335  $parent_node = $this->tree->getParentId($node_id);
336  $this->ctrl->setParameter($this, "wsp_id", $parent_node);
337 
338  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
339  $cgui = new ilConfirmationGUI();
340  $cgui->setHeaderText($lng->txt("info_delete_sure")."<br/>".
341  $lng->txt("info_delete_warning_no_trash"));
342 
343  $cgui->setFormAction($this->ctrl->getFormAction($this));
344  $cgui->setCancel($lng->txt("cancel"), "cancelDelete");
345  $cgui->setConfirm($lng->txt("confirm"), "confirmedDelete");
346 
347  $a_ids = array($node_id);
348  foreach ($a_ids as $node_id)
349  {
350  $children = $this->tree->getSubTree($this->tree->getNodeData($node_id));
351  foreach($children as $child)
352  {
353  $node_id = $child["wsp_id"];
354  $obj_id = $this->tree->lookupObjectId($node_id);
356  $title = call_user_func(array(ilObjectFactory::getClassByType($type),'_lookupTitle'), $obj_id);
357 
358  // if anything fails, abort the whole process
359  if(!$this->checkPermissionBool("delete", "", "", $node_id))
360  {
361  ilUtil::sendFailure($lng->txt("msg_no_perm_delete")." ".$title, true);
362  $this->ctrl->redirect($this);
363  }
364 
365  $cgui->addItem("id[]", $node_id, $title,
366  ilObject::_getIcon($obj_id, "small", $type),
367  $lng->txt("icon")." ".$lng->txt("obj_".$type));
368  }
369  }
370 
371  $tpl->setContent($cgui->getHTML());
372  }
static getClassByType($a_obj_type)
Get class by type.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Confirmation screen class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteConfirmedObjects()

ilObject2GUI::deleteConfirmedObjects ( )
protected

Delete objects (workspace specific)

This should probably be moved elsewhere as done with RepUtil

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

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

Referenced by confirmedDelete().

402  {
403  global $lng, $objDefinition;
404 
405  if(sizeof($_POST["id"]))
406  {
407  // #18797 - because of parent/child relations gather all nodes first
408  $del_nodes = array();
409  foreach($_POST["id"] as $node_id)
410  {
411  $del_nodes[$node_id] = $this->tree->getNodeData($node_id);
412  }
413 
414  foreach($del_nodes as $node_id => $node)
415  {
416  // tree/reference
417  $this->tree->deleteReference($node_id);
418  if($this->tree->isInTree($node_id))
419  {
420  $this->tree->deleteTree($node);
421  }
422 
423  // permission
424  $this->getAccessHandler()->removePermission($node_id);
425 
426  // object
427  $object = ilObjectFactory::getInstanceByObjId($node["obj_id"], false);
428  if($object)
429  {
430  $object->delete();
431  }
432  }
433 
434  ilUtil::sendSuccess($lng->txt("msg_removed"), true);
435  }
436  else
437  {
438  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
439  }
440 
441  $this->ctrl->redirect($this, "");
442  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getAccessHandler()
Get access handler.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayList()

ilObject2GUI::displayList ( )
finalprivate

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

483 { return parent::displayList(); }

◆ edit()

ilObject2GUI::edit ( )

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

588 { parent::editObject(); }

◆ executeCommand()

ilObject2GUI::executeCommand ( )

execute command

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

References $cmd, getAccessHandler(), and prepareOutput().

Referenced by ilObjPortfolioTemplateGUI\executeCommand(), and ilObjDataCollectionGUI\getType().

176  {
177  global $rbacsystem;
178 
179  $next_class = $this->ctrl->getNextClass($this);
180  $cmd = $this->ctrl->getCmd();
181 
182  $this->prepareOutput();
183 
184  switch($next_class)
185  {
186  case "ilworkspaceaccessgui";
187  if($this->node_id)
188  {
189  $this->tabs_gui->activateTab("id_permissions");
190 
191  include_once('./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessGUI.php');
192  $wspacc = new ilWorkspaceAccessGUI($this->node_id, $this->getAccessHandler());
193  $this->ctrl->forwardCommand($wspacc);
194  break;
195  }
196 
197  default:
198  if(!$cmd)
199  {
200  $cmd = "render";
201  }
202  return $this->$cmd();
203  }
204 
205  return true;
206  }
getAccessHandler()
Get access handler.
$cmd
Definition: sahs_server.php:35
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 477 of file class.ilObject2GUI.php.

References $a_type.

477 { return parent::fillCloneSearchTemplate($a_tpl_varname,$a_type); }
$a_type
Definition: workflow.php:93

◆ fillCloneTemplate()

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

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

References $a_type.

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

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

◆ getAccessHandler()

◆ getCenterColumnHTML()

ilObject2GUI::getCenterColumnHTML ( )
finalprotected

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

460 { return parent::getCenterColumnHTML(); }

◆ getCreationMode()

◆ getHTML()

ilObject2GUI::getHTML ( )

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

444 { return parent::getHTML(); }

◆ getPermanentLinkWidget()

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

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

References getType().

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

827  {
828  if($this->id_type == self::WORKSPACE_NODE_ID)
829  {
830  $a_append .= "_wsp";
831  }
832 
833  include_once('Services/PermanentLink/classes/class.ilPermanentLinkGUI.php');
834  $plink = new ilPermanentLinkGUI($this->getType(), $this->node_id , $a_append);
835  $plink->setIncludePermanentLinkText(false);
836  $plink->setAlignCenter($a_center);
837  return $plink->getHTML();
838  }
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 550 of file class.ilObject2GUI.php.

550 { die("ilObject2GUI::getReturnLocation() is deprecated."); }

◆ getRightColumnHTML()

ilObject2GUI::getRightColumnHTML ( )
finalprotected

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

461 { return parent::getRightColumnHTML(); }

◆ getTabs()

ilObject2GUI::getTabs ( )
finalprotected

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

553 {nj(); die("ilObject2GUI::getTabs() is deprecated."); }

◆ getTargetFrame()

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

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

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

457 { return parent::getTargetFrame($a_cmd, $a_target_frame); }
+ 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 699 of file class.ilObject2GUI.php.

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

Referenced by ilObjFileGUI\uploadFiles().

700  {
701  global $objDefinition;
702 
703  $a_callback_ref_id = (int)$a_callback_ref_id;
704  if($a_callback_ref_id)
705  {
706  $callback_type = ilObject::_lookupType($a_callback_ref_id, true);
707  $class_name = "ilObj".$objDefinition->getClassName($callback_type)."GUI";
708  $location = $objDefinition->getLocation($callback_type);
709  include_once($location."/class.".$class_name.".php");
710  if (in_array(strtolower($class_name), array("ilobjitemgroupgui")))
711  {
712  $callback_obj = new $class_name($a_callback_ref_id);
713  }
714  else
715  {
716  $callback_obj = new $class_name(null, $a_callback_ref_id, true, false);
717  }
718  $callback_obj->afterSaveCallback($a_obj);
719  }
720  }
$location
Definition: buildRTE.php:44
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleAutoRating()

ilObject2GUI::handleAutoRating ( ilObject  $a_new_obj)
protected

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

Referenced by ilObjFileGUI\handleFileUpload(), and ilObjFileGUI\save().

842  {
843  // only needed in repository
844  if($this->id_type == self::REPOSITORY_NODE_ID)
845  {
846  parent::handleAutoRating($a_new_obj);
847  }
848  }
+ Here is the caller graph for this function:

◆ hitsperpageObject()

ilObject2GUI::hitsperpageObject ( )
finalprotected

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

555 { die("ilObject2GUI::hitsperpageObject() is deprecated."); }

◆ importFile()

ilObject2GUI::importFile ( )

Import.

public

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

619  {
620  parent::importFileObject($this->parent_id);
621  }

◆ 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 600 of file class.ilObject2GUI.php.

601  {
602  $forms = parent::initCreationForms($a_new_type);
603 
604  // cloning doesn't work in workspace yet
605  if($this->id_type == self::WORKSPACE_NODE_ID)
606  {
607  unset($forms[self::CFORM_CLONE]);
608  }
609 
610  return $forms;
611  }

◆ 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 774 of file class.ilObject2GUI.php.

References $lg, array, getAccessHandler(), getType(), and ilCommonActionDispatcherGUI\TYPE_WORKSPACE.

Referenced by ilObjCloudGUI\addHeaderAction().

775  {
776  global $ilAccess;
777 
778  if($this->id_type == self::WORKSPACE_NODE_ID)
779  {
780  if(!$this->creation_mode && $this->object_id)
781  {
782  include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
784  $this->getAccessHandler(), $this->getType(), $this->node_id, $this->object_id);
785 
786  $dispatcher->setSubObject($a_sub_type, $a_sub_id);
787 
788  include_once "Services/Object/classes/class.ilObjectListGUI.php";
789  ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
790  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false),
791  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false));
792 
793  $lg = $dispatcher->initHeaderAction();
794 
795  if(is_object($lg))
796  {
797  // to enable add to desktop / remove from desktop
798  if($this instanceof ilDesktopItemHandling)
799  {
800  $lg->setContainerObject($this);
801  }
802 
803  // for activation checks see ilObjectGUI
804  // $lg->enableComments(true);
805  $lg->enableNotes(true);
806  // $lg->enableTags(true);
807  }
808 
809  return $lg;
810  }
811  }
812  else
813  {
814  return parent::initHeaderAction();
815  }
816  }
$lg
Definition: example_018.php:62
getAccessHandler()
Get access handler.
getType()
Functions that must be overwritten.
Create styles array
The data for the language used.
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 459 of file class.ilObject2GUI.php.

References $a_type.

459 { return parent::isVisible($a_ref_id,$a_type); }
$a_type
Definition: workflow.php:93

◆ omitLocator()

ilObject2GUI::omitLocator (   $a_omit = true)
finalprotected

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

456 { return parent::omitLocator($a_omit); }

◆ prepareOutput()

◆ putObjectInTree()

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

Add object to tree at given position.

Parameters
ilObject$a_obj
int$a_parent_node_id

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

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

Referenced by ilObjFileGUI\handleFileUpload(), ilObjTestVerificationGUI\save(), ilObjSCORMVerificationGUI\save(), ilObjExerciseVerificationGUI\save(), ilObjCourseVerificationGUI\save(), and ilObjFileGUI\save().

630  {
631  global $rbacreview, $ilUser, $objDefinition;
632 
633  $this->object_id = $a_obj->getId();
634 
635  if(!$a_parent_node_id)
636  {
637  $a_parent_node_id = $this->parent_id;
638  }
639 
640  // add new object to custom parent container
641  if((int)$_REQUEST["crtptrefid"])
642  {
643  $a_parent_node_id = (int)$_REQUEST["crtptrefid"];
644  }
645 
646  switch($this->id_type)
647  {
648  case self::REPOSITORY_NODE_ID:
649  case self::REPOSITORY_OBJECT_ID:
650  if(!$this->node_id)
651  {
652  $a_obj->createReference();
653  $this->node_id = $a_obj->getRefId();
654  }
655  $a_obj->putInTree($a_parent_node_id);
656  $a_obj->setPermissions($a_parent_node_id);
657 
658  // rbac log
659  include_once "Services/AccessControl/classes/class.ilRbacLog.php";
660  $rbac_log_roles = $rbacreview->getParentRoleIds($this->node_id, false);
661  $rbac_log = ilRbacLog::gatherFaPa($this->node_id, array_keys($rbac_log_roles), true);
662  ilRbacLog::add(ilRbacLog::CREATE_OBJECT, $this->node_id, $rbac_log);
663 
664  $this->ctrl->setParameter($this, "ref_id", $this->node_id);
665  break;
666 
667  case self::WORKSPACE_NODE_ID:
668  case self::WORKSPACE_OBJECT_ID:
669  if(!$this->node_id)
670  {
671  $this->node_id = $this->tree->insertObject($a_parent_node_id, $this->object_id);
672  }
673  $this->getAccessHandler()->setPermissions($a_parent_node_id, $this->node_id);
674 
675  $this->ctrl->setParameter($this, "wsp_id", $this->node_id);
676  break;
677 
678  case self::OBJECT_ID:
679  case self::PORTFOLIO_OBJECT_ID:
680  // do nothing
681  break;
682  }
683 
684  // BEGIN ChangeEvent: Record save object.
685  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
686  ilChangeEvent::_recordWriteEvent($this->object_id, $ilUser->getId(), 'create');
687  // END ChangeEvent: Record save object.
688 
689  // use forced callback after object creation
690  self::handleAfterSaveCallback($a_obj, $_REQUEST["crtcb"]);
691  }
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)
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 473 of file class.ilObject2GUI.php.

473 { return parent::redirectToRefId(); } // ok

◆ redrawHeaderAction()

ilObject2GUI::redrawHeaderAction ( )
protected

Updating icons after ajax call.

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

822  {
823  parent::redrawHeaderActionObject();
824  }

◆ removeFromSystem()

ilObject2GUI::removeFromSystem ( )
final

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

472 { return parent::removeFromSystemObject(); } // done

◆ save()

ilObject2GUI::save ( )

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

587 { parent::saveObject(); }

◆ searchCloneSource()

ilObject2GUI::searchCloneSource ( )
finalprotected

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

478 { return parent::searchCloneSourceObject(); }

◆ setColumnSettings()

ilObject2GUI::setColumnSettings ( ilColumnGUI  $column_gui)
finalprotected

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

462 { return parent::setColumnSettings($column_gui); }

◆ setCreationMode()

ilObject2GUI::setCreationMode (   $a_mode = true)
final

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

Referenced by ilObjMediaPoolGUI\executeCommand().

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

◆ setLocator()

ilObject2GUI::setLocator ( )
protected

set Locator

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

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

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

250  {
251  global $ilLocator, $tpl;
252 
253  if ($this->omit_locator)
254  {
255  return;
256  }
257 
258  switch($this->id_type)
259  {
260  case self::REPOSITORY_NODE_ID:
261  $ref_id = $this->node_id
262  ? $this->node_id
264  $ilLocator->addRepositoryItems($ref_id);
265 
266  // not so nice workaround: todo: handle $ilLocator as tabs in ilTemplate
267  if ($_GET["admin_mode"] == "" &&
268  strtolower($this->ctrl->getCmdClass()) == "ilobjrolegui")
269  {
270  $this->ctrl->setParameterByClass("ilobjrolegui",
271  "rolf_ref_id", $_GET["rolf_ref_id"]);
272  $this->ctrl->setParameterByClass("ilobjrolegui",
273  "obj_id", $_GET["obj_id"]);
274  $ilLocator->addItem($this->lng->txt("role"),
275  $this->ctrl->getLinkTargetByClass(array("ilpermissiongui",
276  "ilobjrolegui"), "perm"));
277  }
278 
279  // in workspace this is done in ilPersonalWorkspaceGUI
280  if($this->object_id)
281  {
282  $this->addLocatorItems();
283  }
284  $tpl->setLocator();
285 
286  break;
287 
288  case self::WORKSPACE_NODE_ID:
289  // :TODO:
290  break;
291  }
292 
293 
294  }
$_GET["client_id"]
Create styles array
The data for the language used.
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 551 of file class.ilObject2GUI.php.

551 { die("ilObject2GUI::setReturnLocation() is deprecated."); }

◆ 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 515 of file class.ilObject2GUI.php.

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

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

516  {
517  global $ilTabs, $lng;
518 
519  switch($this->id_type)
520  {
521  case self::REPOSITORY_NODE_ID:
522  case self::REPOSITORY_OBJECT_ID:
523  if ($this->checkPermissionBool("edit_permission"))
524  {
525  $ilTabs->addTab("id_permissions",
526  $lng->txt("perm_settings"),
527  $this->ctrl->getLinkTargetByClass(array(get_class($this), "ilpermissiongui"), "perm"));
528  }
529  break;
530 
531  case self::WORKSPACE_NODE_ID:
532  case self::WORKSPACE_OBJECT_ID:
533  // only files and blogs can be shared for now
534  if ($this->checkPermissionBool("edit_permission") && in_array($this->type, array("file", "blog")) && $this->node_id)
535  {
536  $ilTabs->addTab("id_permissions",
537  $lng->txt("wsp_permissions"),
538  $this->ctrl->getLinkTargetByClass(array(get_class($this), "ilworkspaceaccessgui"), "share"));
539  }
540  break;
541  }
542  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
Create styles array
The data for the language used.
+ 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 458 of file class.ilObject2GUI.php.

458 { return parent::setTargetFrame($a_cmd, $a_target_frame); }

◆ setTitleAndDescription()

ilObject2GUI::setTitleAndDescription ( )
protected

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

453 { return parent::setTitleAndDescription(); }

◆ showActions()

ilObject2GUI::showActions ( )
finalprotected

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

552 { die("ilObject2GUI::showActions() is deprecated."); }

◆ showPossibleSubObjects()

ilObject2GUI::showPossibleSubObjects ( )
finalprotected

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

466 { return parent::showPossibleSubObjects(); }

◆ showUpperIcon()

ilObject2GUI::showUpperIcon ( )
finalprotected

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

454 { return parent::showUpperIcon(); }

◆ trash()

ilObject2GUI::trash ( )
final

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

468 { return parent::trashObject(); } // done

◆ undelete()

ilObject2GUI::undelete ( )
final

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

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

◆ update()

ilObject2GUI::update ( )

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

589 { parent::updateObject(); }

◆ view()

ilObject2GUI::view ( )

view object content (repository/workspace switch)

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

492  {
493  switch($this->id_type)
494  {
495  case self::REPOSITORY_NODE_ID:
496  case self::REPOSITORY_OBJECT_ID:
497  return parent::viewObject();
498 
499  case self::WORKSPACE_NODE_ID:
500  case self::WORKSPACE_OBJECT_ID:
501  return $this->render();
502 
503  case self::OBJECT_ID:
504  case self::PORTFOLIO_OBJECT_ID:
505  // :TODO: should this ever occur? do nothing or edit() ?!
506  break;
507  }
508  }

◆ withReferences()

ilObject2GUI::withReferences ( )
final

Final/Private declaration of unchanged parent methods.

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

449 { return parent::withReferences(); }

Field Documentation

◆ $access_handler

◆ $creation_forms

ilObject2GUI::$creation_forms = array()
protected

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

◆ $id_type

ilObject2GUI::$id_type = array()
protected

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

◆ $node_id

◆ $object_id

ilObject2GUI::$object_id
protected

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

Referenced by __construct().

◆ $parent_id

◆ $tree

◆ OBJECT_ID

const ilObject2GUI::OBJECT_ID = 0

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

Referenced by ilObjTaxonomyGUI\__construct().

◆ PORTFOLIO_OBJECT_ID

const ilObject2GUI::PORTFOLIO_OBJECT_ID = 5

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

Referenced by ilSharedResourceGUI\executeCommand().

◆ REPOSITORY_NODE_ID

◆ REPOSITORY_OBJECT_ID

const ilObject2GUI::REPOSITORY_OBJECT_ID = 3

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

◆ WORKSPACE_NODE_ID

◆ WORKSPACE_OBJECT_ID


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