ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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)
 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...
 
 isVisible ()
 
 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
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Static Public Member Functions

static 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...
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="")
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 redirectToRefId ()
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ()
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ()
 Deprecated functions. More...
 
 setReturnLocation ()
 
 showActions ()
 
 getTitlesByRefId ()
 
 getTabs ()
 
 __showButton ()
 
 hitsperpageObject ()
 
 __initTableGUI ()
 
 __setTableGUIBasicData ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($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
 

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

Reimplemented in ilObjBibliographicGUI, ilObjBlogGUI, ilObjCloudGUI, ilObjFileGUI, ilObjPollGUI, ilObjPortfolioBaseGUI, ilObjRemoteCategoryGUI, ilObjRemoteCourseGUI, ilObjRemoteFileGUI, ilObjRemoteGlossaryGUI, ilObjRemoteGroupGUI, ilObjRemoteLearningModuleGUI, ilObjRemoteTestGUI, ilObjRemoteWikiGUI, ilObjContactAdministrationGUI, ilRemoteObjectBaseGUI, and ilObjectPluginGUI.

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

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 {
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
91 $this->object_id = $a_id;
92 $this->tree = $tree;
93 $this->access_handler = $ilAccess;
94 $params[] = "obj_id"; // ???
95 break;
96
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
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
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 }
const PEAR_ERROR_CALLBACK
Definition: PEAR.php:35
getType()
Functions that must be overwritten.
assignObject()
create object instance as internal property (repository/workspace switch)
afterConstructor()
Do anything that should be done after constructor in here.
static _lookupObjectId($a_ref_id)
lookup object id
Access handler for portfolio.
Access handler for personal workspace.
Tree handler for personal workspace.
$params
Definition: example_049.php:96
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15

References $ilCtrl, $ilErr, $ilUser, ilObjectGUI\$lng, $node_id, ilObjectGUI\$objDefinition, $object_id, $params, ilObjectGUI\$tpl, $tree, ilObject\_lookupObjectId(), afterConstructor(), assignObject(), getType(), OBJECT_ID, PEAR_ERROR_CALLBACK, PORTFOLIO_OBJECT_ID, REPOSITORY_NODE_ID, REPOSITORY_OBJECT_ID, WORKSPACE_NODE_ID, and WORKSPACE_OBJECT_ID.

+ Here is the call graph for this function:

Member Function Documentation

◆ __initTableGUI()

ilObject2GUI::__initTableGUI ( )
finalprotected

Reimplemented from ilObjectGUI.

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

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

◆ __setTableGUIBasicData()

ilObject2GUI::__setTableGUIBasicData ( )
finalprotected

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

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

◆ __showButton()

ilObject2GUI::__showButton ( )
finalprotected

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

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

◆ addAdminLocatorItems()

ilObject2GUI::addAdminLocatorItems ( )
finalprotected

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

486{ return parent::addAdminLocatorItems(); }

Referenced by ilObjectPluginGUI\executeCommand().

+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObject2GUI::addLocatorItems ( )
protected

Functions to be overwritten.

Reimplemented from ilObjectGUI.

Reimplemented in ilObjBibliographicGUI, ilObjBlogGUI, ilObjCloudGUI, ilObjDataCollectionGUI, ilObjFileGUI, ilObjItemGroupGUI, ilObjMediaPoolGUI, ilObjPollGUI, ilObjPortfolioBaseGUI, ilObjLinkResourceGUI, and ilObjectPluginGUI.

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

563{}

Referenced by setLocator().

+ Here is the caller graph for this function:

◆ afterConstructor()

ilObject2GUI::afterConstructor ( )
protected

Do anything that should be done after constructor in here.

Reimplemented in ilObjItemGroupGUI, and ilObjMediaPoolGUI.

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

169 {
170 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ assignObject()

ilObject2GUI::assignObject ( )
finalprotected

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

Reimplemented from ilObjectGUI.

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

212 {
213 if ($this->object_id != 0)
214 {
215 switch($this->id_type)
216 {
217 case self::OBJECT_ID:
221 $this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
222 break;
223
225 $this->object = ilObjectFactory::getInstanceByRefId($this->node_id);
226 break;
227
229 // to be discussed
230 $this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
231 break;
232 }
233 }
234 }
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id

References ilObjectFactory\getInstanceByObjId(), ilObjectFactory\getInstanceByRefId(), OBJECT_ID, PORTFOLIO_OBJECT_ID, REPOSITORY_NODE_ID, REPOSITORY_OBJECT_ID, WORKSPACE_NODE_ID, and WORKSPACE_OBJECT_ID.

Referenced by __construct().

+ 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 ( )

Reimplemented in ilObjTaxonomyGUI.

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

591{ 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 = "" 
)
finalprotected

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

463{ return parent::checkPermission($a_perm, $a_cmd); }

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(), ilObjBlogGUI\editStyleProperties(), ilObjPortfolioBaseGUI\editStyleProperties(), ilObjCloudGUI\executeCommand(), ilObjMediaPoolGUI\executeCommand(), ilObjPortfolioGUI\executeCommand(), ilObjLinkResourceGUI\executeCommand(), ilObjectPluginGUI\executeCommand(), ilObjLinkResourceGUI\history(), ilObjectPluginGUI\infoScreen(), 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().

+ 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

Reimplemented from ilObjectGUI.

Reimplemented in ilObjPortfolioGUI, and ilObjTaxonomyGUI.

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

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

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

Referenced by ilObjLinkResourceGUI\activateTabs(), ilObjBlogGUI\addContributor(), ilObjCloudGUI\asyncGetActionListContent(), 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(), ilObjCloudGUI\executeCommand(), ilObjFileGUI\executeCommand(), ilObjWikiSettingsGUI\getAdminTabs(), ilObjHelpSettingsGUI\getAdminTabs(), ilObjContactAdministrationGUI\getAdminTabs(), ilObjContactAdministrationGUI\getConfigurationForm(), ilObjCloudGUI\getFile(), ilObjFileGUI\handleFileUpload(), ilObjCloudGUI\infoScreen(), ilRemoteObjectBaseGUI\infoScreen(), ilObjBibliographicGUI\infoScreenForward(), ilObjBlogGUI\infoScreenForward(), ilObjDataCollectionGUI\infoScreenForward(), ilObjFileGUI\infoScreenForward(), ilObjPortfolioTemplateGUI\infoScreenForward(), ilObjWikiSettingsGUI\initForm(), ilObjBlogGUI\isAdmin(), ilObjBlogGUI\mayContribute(), ilObjBlogGUI\mayEditPosting(), ilObjWorkspaceFolderGUI\performPasteIntoMultipleObjects(), ilObjPortfolioBaseGUI\preview(), ilObjPortfolioTemplateGUI\preview(), ilObjBlogGUI\preview(), ilObjPollGUI\render(), ilObjBlogGUI\render(), ilObjCloudGUI\render(), ilObjFileGUI\rollbackVersion(), ilObjFileGUI\save(), ilObjPortfolioBaseGUI\savePortfolioPagesOrdering(), ilObjFileGUI\saveUnzip(), ilObjFileGUI\sendFile(), ilObjHelpSettingsGUI\setMode(), ilObjWorkspaceFolderGUI\setTabs(), ilObjBlogGUI\setTabs(), ilObjFileGUI\setTabs(), ilObjPollGUI\setTabs(), ilObjPortfolioTemplateGUI\setTabs(), ilObjLinkResourceGUI\setTabs(), setTabs(), ilRemoteObjectBaseGUI\setTabs(), ilObjPollGUI\showParticipants(), ilObjPollGUI\showParticipantVotes(), ilObjLinkResourceGUI\showToolbar(), ilRemoteObjectBaseGUI\updateObject(), ilObjFileGUI\uploadFiles(), ilObjHelpSettingsGUI\uploadHelpFile(), ilObjFileGUI\versions(), and ilObjPortfolioBaseGUI\view().

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

Reimplemented in ilObjTaxonomyGUI.

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

378 {
379 switch($this->id_type)
380 {
383 return parent::confirmedDeleteObject();
384
387 return $this->deleteConfirmedObjects();
388
389 case self::OBJECT_ID:
391 // :TODO: should this ever occur?
392 break;
393 }
394 }
deleteConfirmedObjects()
Delete objects (workspace specific)

References deleteConfirmedObjects(), OBJECT_ID, PORTFOLIO_OBJECT_ID, REPOSITORY_NODE_ID, REPOSITORY_OBJECT_ID, WORKSPACE_NODE_ID, and WORKSPACE_OBJECT_ID.

+ Here is the call graph for this function:

◆ create()

ilObject2GUI::create ( )

Deleted in ilObject.

CRUD

Reimplemented in ilObjCourseVerificationGUI, ilObjExerciseVerificationGUI, ilObjSCORMVerificationGUI, and ilObjTestVerificationGUI.

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

587{ parent::createObject(); }

Referenced by ilObjTaxonomyGUI\createAssignedTaxonomy().

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

300 {
301 switch($this->id_type)
302 {
305 return parent::deleteObject();
306
309 return $this->deleteConfirmation();
310
311 case self::OBJECT_ID:
313 // :TODO: should this ever occur?
314 break;
315 }
316 }
deleteConfirmation()
Display delete confirmation form (workspace specific)

References deleteConfirmation(), OBJECT_ID, PORTFOLIO_OBJECT_ID, REPOSITORY_NODE_ID, REPOSITORY_OBJECT_ID, WORKSPACE_NODE_ID, and WORKSPACE_OBJECT_ID.

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

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 }
Confirmation screen class.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
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.
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7

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

Referenced by delete().

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

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.
$_POST['username']
Definition: cron.php:12

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

Referenced by confirmedDelete().

+ 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 ( )

Reimplemented in ilObjFileGUI, ilObjMediaPoolGUI, and ilObjWorkspaceFolderGUI.

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

589{ parent::editObject(); }

◆ executeCommand()

& ilObject2GUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Reimplemented in ilObjBibliographicGUI, ilObjBlogGUI, ilObjCloudGUI, ilObjFileGUI, ilObjItemGroupGUI, ilObjMediaPoolGUI, ilObjPollGUI, ilObjPortfolioGUI, ilObjPortfolioTemplateGUI, ilObjLinkResourceGUI, ilObjWikiSettingsGUI, ilObjWorkspaceFolderGUI, ilObjContactAdministrationGUI, ilObjHelpSettingsGUI, ilObjectPluginGUI, ilObjTaxonomyGUI, ilObjTermsOfServiceGUI, and ilRemoteObjectBaseGUI.

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

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 }
prepareOutput()
prepare output
$cmd
Definition: sahs_server.php:35

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

Referenced by ilObjPortfolioTemplateGUI\executeCommand().

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

477{ return parent::fillCloneSearchTemplate($a_tpl_varname,$a_type); }

◆ fillCloneTemplate()

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

Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.

@access public

Parameters
stringtemplate variable name that will be filled
stringtype of new object

Reimplemented from ilObjectGUI.

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

476{ return parent::fillCloneTemplate($a_tpl_varname,$a_type); }

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

+ Here is the caller graph for this function:

◆ getAccessHandler()

◆ getCenterColumnHTML()

ilObject2GUI::getCenterColumnHTML ( )
finalprotected

Get center column.

Reimplemented from ilObjectGUI.

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

460{ return parent::getCenterColumnHTML(); }

◆ getCreationMode()

◆ getHTML()

ilObject2GUI::getHTML ( )

Reimplemented from ilObjectGUI.

Reimplemented in ilObjBlogGUI, and ilObjPollGUI.

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

828 {
829 if($this->id_type == self::WORKSPACE_NODE_ID)
830 {
831 $a_append .= "_wsp";
832 }
833
834 include_once('Services/PermanentLink/classes/class.ilPermanentLinkGUI.php');
835 $plink = new ilPermanentLinkGUI($this->getType(), $this->node_id , $a_append);
836 $plink->setIncludePermanentLinkText(false);
837 $plink->setAlignCenter($a_center);
838 return $plink->getHTML();
839 }
Class for permanent links.

References getType().

+ Here is the call graph for this function:

◆ getReturnLocation()

ilObject2GUI::getReturnLocation ( )
finalprotected

Deprecated functions.

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

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

◆ getRightColumnHTML()

ilObject2GUI::getRightColumnHTML ( )
finalprotected

Display right column.

Reimplemented from ilObjectGUI.

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

461{ return parent::getRightColumnHTML(); }

◆ getTabs()

ilObject2GUI::getTabs ( )
finalprotected

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

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

◆ getTargetFrame()

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

get target frame for command (command is method name without "Object", e.g.

"perm")

Parameters
string$a_cmdcommand
string$a_target_framedefault target frame (is returned, if no special target frame was set) @access public

Reimplemented from ilObjectGUI.

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

457{ return parent::getTargetFrame($a_cmd, $a_target_frame); }

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

+ Here is the caller graph for this function:

◆ getTitlesByRefId()

ilObject2GUI::getTitlesByRefId ( )
finalprotected

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

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

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

701 {
702 global $objDefinition;
703
704 $a_callback_ref_id = (int)$a_callback_ref_id;
705 if($a_callback_ref_id)
706 {
707 $callback_type = ilObject::_lookupType($a_callback_ref_id, true);
708 $class_name = "ilObj".$objDefinition->getClassName($callback_type)."GUI";
709 $location = $objDefinition->getLocation($callback_type);
710 include_once($location."/class.".$class_name.".php");
711 if (in_array(strtolower($class_name), array("ilobjitemgroupgui")))
712 {
713 $callback_obj = new $class_name($a_callback_ref_id);
714 }
715 else
716 {
717 $callback_obj = new $class_name(null, $a_callback_ref_id, true, false);
718 }
719 $callback_obj->afterSaveCallback($a_obj);
720 }
721 }
$location
Definition: buildRTE.php:44

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

Referenced by putObjectInTree(), and ilObjFileGUI\uploadFiles().

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

◆ handleAutoRating()

ilObject2GUI::handleAutoRating ( ilObject  $a_new_obj)
protected

Activate rating automatically if parent container setting.

Parameters
ilObject$a_new_obj

Reimplemented from ilObjectGUI.

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

843 {
844 // only needed in repository
845 if($this->id_type == self::REPOSITORY_NODE_ID)
846 {
847 parent::handleAutoRating($a_new_obj);
848 }
849 }

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

+ Here is the caller graph for this function:

◆ hitsperpageObject()

ilObject2GUI::hitsperpageObject ( )
finalprotected

Reimplemented from ilObjectGUI.

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

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

◆ importFile()

ilObject2GUI::importFile ( )

Import.

@access public

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

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

◆ 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

Reimplemented from ilObjectGUI.

Reimplemented in ilObjBibliographicGUI, ilObjBlogGUI, ilObjCloudGUI, ilObjDataCollectionGUI, ilObjItemGroupGUI, ilObjMediaPoolGUI, ilObjPortfolioGUI, ilObjWorkspaceFolderGUI, and ilObjectPluginGUI.

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

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

◆ 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

Reimplemented from ilObjectGUI.

Reimplemented in ilObjFileGUI.

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

776 {
777 global $ilAccess;
778
779 if($this->id_type == self::WORKSPACE_NODE_ID)
780 {
781 if(!$this->creation_mode && $this->object_id)
782 {
783 include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
785 $this->getAccessHandler(), $this->getType(), $this->node_id, $this->object_id);
786
787 $dispatcher->setSubObject($a_sub_type, $a_sub_id);
788
789 include_once "Services/Object/classes/class.ilObjectListGUI.php";
790 ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
791 $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false),
792 $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false));
793
794 $lg = $dispatcher->initHeaderAction();
795
796 if(is_object($lg))
797 {
798 // to enable add to desktop / remove from desktop
799 if($this instanceof ilDesktopItemHandling)
800 {
801 $lg->setContainerObject($this);
802 }
803
804 // for activation checks see ilObjectGUI
805 // $lg->enableComments(true);
806 $lg->enableNotes(true);
807 // $lg->enableTags(true);
808 }
809
810 return $lg;
811 }
812 }
813 else
814 {
815 return parent::initHeaderAction();
816 }
817 }
Class ilCommonActionDispatcherGUI.
$lg
Definition: example_018.php:62
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.

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

Referenced by ilObjCloudGUI\addHeaderAction().

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

◆ isVisible()

ilObject2GUI::isVisible ( )
final

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

459{ return parent::isVisible(); }

◆ omitLocator()

ilObject2GUI::omitLocator (   $a_omit = true)
finalprotected

Reimplemented from ilObjectGUI.

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

Reimplemented from ilObjectGUI.

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

631 {
632 global $rbacreview, $ilUser, $objDefinition;
633
634 $this->object_id = $a_obj->getId();
635
636 if(!$a_parent_node_id)
637 {
638 $a_parent_node_id = $this->parent_id;
639 }
640
641 // add new object to custom parent container
642 if((int)$_REQUEST["crtptrefid"])
643 {
644 $a_parent_node_id = (int)$_REQUEST["crtptrefid"];
645 }
646
647 switch($this->id_type)
648 {
651 if(!$this->node_id)
652 {
653 $a_obj->createReference();
654 $this->node_id = $a_obj->getRefId();
655 }
656 $a_obj->putInTree($a_parent_node_id);
657 $a_obj->setPermissions($a_parent_node_id);
658
659 // rbac log
660 include_once "Services/AccessControl/classes/class.ilRbacLog.php";
661 $rbac_log_roles = $rbacreview->getParentRoleIds($this->node_id, false);
662 $rbac_log = ilRbacLog::gatherFaPa($this->node_id, array_keys($rbac_log_roles), true);
663 ilRbacLog::add(ilRbacLog::CREATE_OBJECT, $this->node_id, $rbac_log);
664
665 $this->ctrl->setParameter($this, "ref_id", $this->node_id);
666 break;
667
670 if(!$this->node_id)
671 {
672 $this->node_id = $this->tree->insertObject($a_parent_node_id, $this->object_id);
673 }
674 $this->getAccessHandler()->setPermissions($a_parent_node_id, $this->node_id);
675
676 $this->ctrl->setParameter($this, "wsp_id", $this->node_id);
677 break;
678
679 case self::OBJECT_ID:
681 // do nothing
682 break;
683 }
684
685 // BEGIN ChangeEvent: Record save object.
686 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
687 ilChangeEvent::_recordWriteEvent($this->object_id, $ilUser->getId(), 'create');
688 // END ChangeEvent: Record save object.
689
690 // use forced callback after object creation
691 self::handleAfterSaveCallback($a_obj, $_REQUEST["crtcb"]);
692 }
_recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
static handleAfterSaveCallback(ilObject $a_obj, $a_callback_ref_id)
After creation callback.
createReference()
creates reference for object
setPermissions($a_parent_ref)
set permissions of object
getRefId()
get reference id @access public
getId()
get object id @access public
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)
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
const CREATE_OBJECT

References $_REQUEST, $ilUser, ilObjectGUI\$objDefinition, $parent_id, ilChangeEvent\_recordWriteEvent(), ilRbacLog\add(), ilRbacLog\CREATE_OBJECT, ilObject\createReference(), ilRbacLog\gatherFaPa(), getAccessHandler(), ilObject\getId(), ilObject\getRefId(), handleAfterSaveCallback(), OBJECT_ID, PORTFOLIO_OBJECT_ID, ilObject\putInTree(), REPOSITORY_NODE_ID, REPOSITORY_OBJECT_ID, ilObject\setPermissions(), WORKSPACE_NODE_ID, and WORKSPACE_OBJECT_ID.

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

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

◆ redirectToRefId()

ilObject2GUI::redirectToRefId ( )
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 822 of file class.ilObject2GUI.php.

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

◆ removeFromSystem()

ilObject2GUI::removeFromSystem ( )
final

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

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

◆ save()

◆ searchCloneSource()

ilObject2GUI::searchCloneSource ( )
finalprotected

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

478{ return parent::searchCloneSourceObject(); }

◆ setColumnSettings()

ilObject2GUI::setColumnSettings (   $column_gui)
finalprotected

May be overwritten in subclasses.

Reimplemented from ilObjectGUI.

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

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

◆ setCreationMode()

ilObject2GUI::setCreationMode (   $a_mode = true)
final

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

Reimplemented from ilObjectGUI.

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

450{ return parent::setCreationMode($a_mode); }

Referenced by ilObjMediaPoolGUI\executeCommand().

+ Here is the caller graph for this function:

◆ setLocator()

ilObject2GUI::setLocator ( )
finalprotected

set Locator

Reimplemented from ilObjectGUI.

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

250 {
251 global $ilLocator, $tpl;
252
253 if ($this->omit_locator)
254 {
255 return;
256 }
257
258 switch($this->id_type)
259 {
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
289 // :TODO:
290 break;
291 }
292
293
294 }
$_GET["client_id"]
addLocatorItems()
Functions to be overwritten.

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

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

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

◆ setReturnLocation()

ilObject2GUI::setReturnLocation ( )
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

Reimplemented from ilObjectGUI.

Reimplemented in ilObjBlogGUI, ilObjCloudGUI, ilObjDataCollectionGUI, ilObjFileGUI, ilObjItemGroupGUI, ilObjMediaPoolGUI, ilObjPollGUI, ilObjPortfolioGUI, ilObjPortfolioTemplateGUI, ilObjLinkResourceGUI, ilObjWorkspaceRootFolderGUI, and ilRemoteObjectBaseGUI.

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

516 {
517 global $ilTabs, $lng;
518
519 switch($this->id_type)
520 {
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
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 }

References ilObjectGUI\$lng, checkPermissionBool(), REPOSITORY_NODE_ID, REPOSITORY_OBJECT_ID, WORKSPACE_NODE_ID, and WORKSPACE_OBJECT_ID.

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

+ 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

set specific target frame for command

Parameters
string$a_cmdcommand
string$a_target_framedefault target frame (is returned, if no special target frame was set) @access public

Reimplemented from ilObjectGUI.

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

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

◆ setTitleAndDescription()

ilObject2GUI::setTitleAndDescription ( )
protected

called by prepare output

Reimplemented from ilObjectGUI.

Reimplemented in ilObjPortfolioGUI, and ilObjWorkspaceRootFolderGUI.

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

show possible subobjects (pulldown menu)

@access public

Reimplemented from ilObjectGUI.

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

Reimplemented in ilObjFileGUI, and ilObjWorkspaceFolderGUI.

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

590{ parent::updateObject(); }

◆ view()

ilObject2GUI::view ( )

view object content (repository/workspace switch)

Reimplemented in ilObjBibliographicGUI, ilObjPortfolioBaseGUI, and ilObjLinkResourceGUI.

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

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

References OBJECT_ID, PORTFOLIO_OBJECT_ID, REPOSITORY_NODE_ID, REPOSITORY_OBJECT_ID, WORKSPACE_NODE_ID, and WORKSPACE_OBJECT_ID.

◆ withReferences()

ilObject2GUI::withReferences ( )
final

Final/Private declaration of unchanged parent methods.

Reimplemented from ilObjectGUI.

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

◆ PORTFOLIO_OBJECT_ID

const ilObject2GUI::PORTFOLIO_OBJECT_ID = 5

◆ REPOSITORY_NODE_ID

◆ REPOSITORY_OBJECT_ID

const ilObject2GUI::REPOSITORY_OBJECT_ID = 3

◆ WORKSPACE_NODE_ID

◆ WORKSPACE_OBJECT_ID


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