ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObject2GUI Class Reference

New implementation of ilObjectGUI. More...

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

Public Member Functions

 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 delete ()
 Display delete confirmation form (repository/workspace switch) More...
 
 confirmedDelete ()
 Delete objects (repository/workspace switch) More...
 
 getHTML ()
 
 withReferences ()
 Final/Private declaration of unchanged parent methods. More...
 
 setCreationMode ($a_mode=true)
 
 getCreationMode ()
 
 prepareOutput ($a_show_subobjects=true)
 
 isVisible ($a_ref_id, $a_type)
 
 trash ()
 
 undelete ()
 
 cancelDelete ()
 
 removeFromSystem ()
 
 cloneAll ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 Deleted in ilObject. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 Import. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 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...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. 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
 
 $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...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

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

Private Member Functions

 displayList ()
 

Detailed Description

New implementation of ilObjectGUI.

(beta)

Differences to the ilObject implementation:

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

All new modules should derive from this class.

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

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

Parameters
int$a_id
int$a_id_type
int$a_parent_node_id

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

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

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

Member Function Documentation

◆ __initTableGUI()

& ilObject2GUI::__initTableGUI ( )
finalprotected

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

669  {
670  die("ilObject2GUI::__initTableGUI() is deprecated.");
671  }

◆ __setTableGUIBasicData()

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

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

673  {
674  die("ilObject2GUI::__setTableGUIBasicData() is deprecated.");
675  }

◆ __showButton()

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

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

661  {
662  die("ilObject2GUI::__showButton() is deprecated.");
663  }

◆ addAdminLocatorItems()

ilObject2GUI::addAdminLocatorItems (   $a_do_not_add_object = false)
finalprotected

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

Referenced by ilObjectPluginGUI\executeCommand().

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

◆ addLocatorItems()

ilObject2GUI::addLocatorItems ( )
protected

Functions to be overwritten.

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

References getType().

Referenced by setLocator().

681  {
682  }
+ 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 178 of file class.ilObject2GUI.php.

Referenced by __construct().

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

◆ assignObject()

ilObject2GUI::assignObject ( )
finalprotected

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

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

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

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

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

562  {
563  return parent::buildCloneSelect($existing_objs);
564  }

◆ cancel()

ilObject2GUI::cancel ( )

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

723  {
724  parent::cancelObject();
725  }

◆ cancelDelete()

ilObject2GUI::cancelDelete ( )
final

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

532  {
533  return parent::cancelDeleteObject();
534  } // ok

◆ checkPermission()

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

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

References $a_type.

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

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

◆ checkPermissionBool()

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

Check permission.

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

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

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

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

864  {
865  global $DIC;
866 
867  $ilUser = $DIC["ilUser"];
868 
869 
870  if ($a_perm == "create") {
871  if (!$a_node_id) {
872  $a_node_id = $this->parent_id;
873  }
874  if ($a_node_id) {
875  return $this->getAccessHandler()->checkAccess($a_perm . "_" . $a_type, $a_cmd, $a_node_id);
876  }
877  } else {
878  if (!$a_node_id) {
879  $a_node_id = $this->node_id;
880  }
881  if ($a_node_id) {
882  return $this->getAccessHandler()->checkAccess($a_perm, $a_cmd, $a_node_id);
883  }
884  }
885 
886  // if we do not have a node id, check if current user is owner
887  if ($this->obj_id && $this->object->getOwner() == $ilUser->getId()) {
888  return true;
889  }
890  return false;
891  }
global $DIC
Definition: saml.php:7
getAccessHandler()
Get access handler.
$a_type
Definition: workflow.php:92
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneAll()

ilObject2GUI::cloneAll ( )
final

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

558  {
559  return parent::cloneAllObject();
560  }

◆ confirmedDelete()

ilObject2GUI::confirmedDelete ( )

Delete objects (repository/workspace switch)

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

References deleteConfirmedObjects().

389  {
390  switch ($this->id_type) {
391  case self::REPOSITORY_NODE_ID:
392  case self::REPOSITORY_OBJECT_ID:
393  return parent::confirmedDeleteObject();
394 
395  case self::WORKSPACE_NODE_ID:
396  case self::WORKSPACE_OBJECT_ID:
397  return $this->deleteConfirmedObjects();
398 
399  case self::OBJECT_ID:
400  case self::PORTFOLIO_OBJECT_ID:
401  // :TODO: should this ever occur?
402  break;
403  }
404  }
deleteConfirmedObjects()
Delete objects (workspace specific)
+ Here is the call graph for this function:

◆ create()

ilObject2GUI::create ( )

Deleted in ilObject.

CRUD

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

Referenced by ilObjTaxonomyGUI\createAssignedTaxonomy().

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

◆ delete()

ilObject2GUI::delete ( )

Display delete confirmation form (repository/workspace switch)

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

References deleteConfirmation().

309  {
310  switch ($this->id_type) {
311  case self::REPOSITORY_NODE_ID:
312  case self::REPOSITORY_OBJECT_ID:
313  return parent::deleteObject();
314 
315  case self::WORKSPACE_NODE_ID:
316  case self::WORKSPACE_OBJECT_ID:
317  return $this->deleteConfirmation();
318 
319  case self::OBJECT_ID:
320  case self::PORTFOLIO_OBJECT_ID:
321  // :TODO: should this ever occur?
322  break;
323  }
324  }
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 331 of file class.ilObject2GUI.php.

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

Referenced by delete().

332  {
333  global $DIC;
334 
335  $tpl = $DIC["tpl"];
336  $lng = $DIC["lng"];
337 
338  $node_id = (int) $_REQUEST["item_ref_id"];
339  if (!$node_id) {
340  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
341  $this->ctrl->redirect($this, "");
342  }
343 
344  // on cancel or fail we return to parent node
345  $parent_node = $this->tree->getParentId($node_id);
346  $this->ctrl->setParameter($this, "wsp_id", $parent_node);
347 
348  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
349  $cgui = new ilConfirmationGUI();
350  $cgui->setHeaderText($lng->txt("info_delete_sure") . "<br/>" .
351  $lng->txt("info_delete_warning_no_trash"));
352 
353  $cgui->setFormAction($this->ctrl->getFormAction($this));
354  $cgui->setCancel($lng->txt("cancel"), "cancelDelete");
355  $cgui->setConfirm($lng->txt("confirm"), "confirmedDelete");
356 
357  $a_ids = array($node_id);
358  foreach ($a_ids as $node_id) {
359  $children = $this->tree->getSubTree($this->tree->getNodeData($node_id));
360  foreach ($children as $child) {
361  $node_id = $child["wsp_id"];
362  $obj_id = $this->tree->lookupObjectId($node_id);
364  $title = call_user_func(array(ilObjectFactory::getClassByType($type),'_lookupTitle'), $obj_id);
365 
366  // if anything fails, abort the whole process
367  if (!$this->checkPermissionBool("delete", "", "", $node_id)) {
368  ilUtil::sendFailure($lng->txt("msg_no_perm_delete") . " " . $title, true);
369  $this->ctrl->redirect($this);
370  }
371 
372  $cgui->addItem(
373  "id[]",
374  $node_id,
375  $title,
376  ilObject::_getIcon($obj_id, "small", $type),
377  $lng->txt("icon") . " " . $lng->txt("obj_" . $type)
378  );
379  }
380  }
381 
382  $tpl->setContent($cgui->getHTML());
383  }
static getClassByType($a_obj_type)
Get class by type.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
$type
global $DIC
Definition: saml.php:7
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 411 of file class.ilObject2GUI.php.

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

Referenced by confirmedDelete().

412  {
413  global $DIC;
414 
415  $lng = $DIC["lng"];
416 
417 
418  if (sizeof($_POST["id"])) {
419  // #18797 - because of parent/child relations gather all nodes first
420  $del_nodes = array();
421  foreach ($_POST["id"] as $node_id) {
422  $del_nodes[$node_id] = $this->tree->getNodeData($node_id);
423  }
424 
425  foreach ($del_nodes as $node_id => $node) {
426  // tree/reference
427  $this->tree->deleteReference($node_id);
428  if ($this->tree->isInTree($node_id)) {
429  $this->tree->deleteTree($node);
430  }
431 
432  // permission
433  $this->getAccessHandler()->removePermission($node_id);
434 
435  // object
436  $object = ilObjectFactory::getInstanceByObjId($node["obj_id"], false);
437  if ($object) {
438  $object->delete();
439  }
440  }
441 
442  ilUtil::sendSuccess($lng->txt("msg_removed"), true);
443  } else {
444  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
445  }
446 
447  $this->ctrl->redirect($this, "");
448  }
global $DIC
Definition: saml.php:7
getAccessHandler()
Get access handler.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_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 567 of file class.ilObject2GUI.php.

568  {
569  return parent::displayList();
570  }

◆ edit()

ilObject2GUI::edit ( )

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

715  {
716  parent::editObject();
717  }

◆ executeCommand()

ilObject2GUI::executeCommand ( )

execute command

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

References getAccessHandler(), and prepareOutput().

Referenced by ilObjPortfolioTemplateGUI\executeCommand().

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

◆ fillCloneSearchTemplate()

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

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

References $a_type.

550  {
551  return parent::fillCloneSearchTemplate($a_tpl_varname, $a_type);
552  }
$a_type
Definition: workflow.php:92

◆ fillCloneTemplate()

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

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

References $a_type.

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

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

◆ getAccessHandler()

◆ getCenterColumnHTML()

ilObject2GUI::getCenterColumnHTML ( )
finalprotected

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

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

◆ getCreationMode()

◆ getHTML()

ilObject2GUI::getHTML ( )

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

451  {
452  return parent::getHTML();
453  }

◆ getPermanentLinkWidget()

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

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

References getType().

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

952  {
953  if ($this->id_type == self::WORKSPACE_NODE_ID) {
954  $a_append .= "_wsp";
955  }
956 
957  include_once('Services/PermanentLink/classes/class.ilPermanentLinkGUI.php');
958  $plink = new ilPermanentLinkGUI($this->getType(), $this->node_id, $a_append);
959  $plink->setIncludePermanentLinkText(false);
960  $plink->setAlignCenter($a_center);
961  return $plink->getHTML();
962  }
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 644 of file class.ilObject2GUI.php.

645  {
646  die("ilObject2GUI::getReturnLocation() is deprecated.");
647  }

◆ getRightColumnHTML()

ilObject2GUI::getRightColumnHTML ( )
finalprotected

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

504  {
505  return parent::getRightColumnHTML();
506  }

◆ getTabs()

ilObject2GUI::getTabs ( )
finalprotected

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

657  {
658  die("ilObject2GUI::getTabs() is deprecated.");
659  }

◆ getTargetFrame()

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

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

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

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

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

Referenced by ilObjFileGUI\uploadFiles().

833  {
834  global $DIC;
835 
836  $objDefinition = $DIC["objDefinition"];
837 
838 
839  $a_callback_ref_id = (int) $a_callback_ref_id;
840  if ($a_callback_ref_id) {
841  $callback_type = ilObject::_lookupType($a_callback_ref_id, true);
842  $class_name = "ilObj" . $objDefinition->getClassName($callback_type) . "GUI";
843  $location = $objDefinition->getLocation($callback_type);
844  include_once($location . "/class." . $class_name . ".php");
845  if (in_array(strtolower($class_name), array("ilobjitemgroupgui"))) {
846  $callback_obj = new $class_name($a_callback_ref_id);
847  } else {
848  $callback_obj = new $class_name(null, $a_callback_ref_id, true, false);
849  }
850  $callback_obj->afterSaveCallback($a_obj);
851  }
852  }
global $DIC
Definition: saml.php:7
$location
Definition: buildRTE.php:44
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
Parameters
\ilObject$a_new_obj

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

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

969  {
970  // only needed in repository
971  if ($this->id_type == self::REPOSITORY_NODE_ID) {
972  parent::handleAutoRating($a_new_obj);
973  }
974  }
+ Here is the caller graph for this function:

◆ hitsperpageObject()

ilObject2GUI::hitsperpageObject ( )
finalprotected

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

665  {
666  die("ilObject2GUI::hitsperpageObject() is deprecated.");
667  }

◆ importFile()

ilObject2GUI::importFile ( )

Import.

public

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

753  {
754  parent::importFileObject($this->parent_id);
755  }

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

736  {
737  $forms = parent::initCreationForms($a_new_type);
738 
739  // cloning doesn't work in workspace yet
740  if ($this->id_type == self::WORKSPACE_NODE_ID) {
741  unset($forms[self::CFORM_CLONE]);
742  }
743 
744  return $forms;
745  }

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

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

Referenced by ilObjCloudGUI\addHeaderAction().

901  {
902  if ($this->id_type == self::WORKSPACE_NODE_ID) {
903  if (!$this->creation_mode && $this->object_id) {
904  include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
905  $dispatcher = new ilCommonActionDispatcherGUI(
907  $this->getAccessHandler(),
908  $this->getType(),
909  $this->node_id,
910  $this->object_id
911  );
912 
913  $dispatcher->setSubObject($a_sub_type, $a_sub_id);
914 
915  include_once "Services/Object/classes/class.ilObjectListGUI.php";
916  ilObjectListGUI::prepareJSLinks(
917  $this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
918  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false),
919  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false)
920  );
921 
922  $lg = $dispatcher->initHeaderAction();
923 
924  if (is_object($lg)) {
925  // to enable add to desktop / remove from desktop
926  if ($this instanceof ilDesktopItemHandling) {
927  $lg->setContainerObject($this);
928  }
929 
930  // for activation checks see ilObjectGUI
931  // $lg->enableComments(true);
932  $lg->enableNotes(true);
933  // $lg->enableTags(true);
934  }
935 
936  return $lg;
937  }
938  } else {
939  return parent::initHeaderAction();
940  }
941  }
$lg
Definition: example_018.php:62
getAccessHandler()
Get access handler.
getType()
Functions that must be overwritten.
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
Class ilCommonActionDispatcherGUI.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isVisible()

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

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

References $a_type.

496  {
497  return parent::isVisible($a_ref_id, $a_type);
498  }
$a_type
Definition: workflow.php:92

◆ omitLocator()

ilObject2GUI::omitLocator (   $a_omit = true)
finalprotected

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

484  {
485  return parent::omitLocator($a_omit);
486  }

◆ prepareOutput()

◆ putObjectInTree()

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

Add object to tree at given position.

Parameters
ilObject$a_obj
int$a_parent_node_id

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

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

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

764  {
765  global $DIC;
766 
767  $rbacreview = $DIC["rbacreview"];
768  $ilUser = $DIC["ilUser"];
769 
770 
771  $this->object_id = $a_obj->getId();
772 
773  if (!$a_parent_node_id) {
774  $a_parent_node_id = $this->parent_id;
775  }
776 
777  // add new object to custom parent container
778  if ((int) $_REQUEST["crtptrefid"]) {
779  $a_parent_node_id = (int) $_REQUEST["crtptrefid"];
780  }
781 
782  switch ($this->id_type) {
783  case self::REPOSITORY_NODE_ID:
784  case self::REPOSITORY_OBJECT_ID:
785  if (!$this->node_id) {
786  $a_obj->createReference();
787  $this->node_id = $a_obj->getRefId();
788  }
789  $a_obj->putInTree($a_parent_node_id);
790  $a_obj->setPermissions($a_parent_node_id);
791 
792  // rbac log
793  include_once "Services/AccessControl/classes/class.ilRbacLog.php";
794  $rbac_log_roles = $rbacreview->getParentRoleIds($this->node_id, false);
795  $rbac_log = ilRbacLog::gatherFaPa($this->node_id, array_keys($rbac_log_roles), true);
796  ilRbacLog::add(ilRbacLog::CREATE_OBJECT, $this->node_id, $rbac_log);
797 
798  $this->ctrl->setParameter($this, "ref_id", $this->node_id);
799  break;
800 
801  case self::WORKSPACE_NODE_ID:
802  case self::WORKSPACE_OBJECT_ID:
803  if (!$this->node_id) {
804  $this->node_id = $this->tree->insertObject($a_parent_node_id, $this->object_id);
805  }
806  $this->getAccessHandler()->setPermissions($a_parent_node_id, $this->node_id);
807 
808  $this->ctrl->setParameter($this, "wsp_id", $this->node_id);
809  break;
810 
811  case self::OBJECT_ID:
812  case self::PORTFOLIO_OBJECT_ID:
813  // do nothing
814  break;
815  }
816 
817  // BEGIN ChangeEvent: Record save object.
818  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
819  ilChangeEvent::_recordWriteEvent($this->object_id, $ilUser->getId(), 'create');
820  // END ChangeEvent: Record save object.
821 
822  // use forced callback after object creation
823  self::handleAfterSaveCallback($a_obj, $_REQUEST["crtcb"]);
824  }
global $DIC
Definition: saml.php:7
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 539 of file class.ilObject2GUI.php.

540  {
541  return parent::redirectToRefId();
542  } // ok

◆ redrawHeaderAction()

ilObject2GUI::redrawHeaderAction ( )
protected

Updating icons after ajax call.

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

947  {
948  parent::redrawHeaderActionObject();
949  }

◆ removeFromSystem()

ilObject2GUI::removeFromSystem ( )
final

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

536  {
537  return parent::removeFromSystemObject();
538  } // done

◆ save()

ilObject2GUI::save ( )

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

711  {
712  parent::saveObject();
713  }

◆ searchCloneSource()

ilObject2GUI::searchCloneSource ( )
finalprotected

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

554  {
555  return parent::searchCloneSourceObject();
556  }

◆ setColumnSettings()

ilObject2GUI::setColumnSettings ( ilColumnGUI  $column_gui)
finalprotected

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

508  {
509  return parent::setColumnSettings($column_gui);
510  }

◆ setCreationMode()

ilObject2GUI::setCreationMode (   $a_mode = true)
final

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

Referenced by ilObjMediaPoolGUI\executeCommand().

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

◆ setLocator()

ilObject2GUI::setLocator ( )
protected

set Locator

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

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

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

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

649  {
650  die("ilObject2GUI::setReturnLocation() is deprecated.");
651  }

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

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

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

605  {
606  global $DIC;
607 
608  $ilTabs = $DIC["ilTabs"];
609  $lng = $DIC["lng"];
610 
611 
612  switch ($this->id_type) {
613  case self::REPOSITORY_NODE_ID:
614  case self::REPOSITORY_OBJECT_ID:
615  if ($this->checkPermissionBool("edit_permission")) {
616  $ilTabs->addTab(
617  "id_permissions",
618  $lng->txt("perm_settings"),
619  $this->ctrl->getLinkTargetByClass(array(get_class($this), "ilpermissiongui"), "perm")
620  );
621  }
622  break;
623 
624  case self::WORKSPACE_NODE_ID:
625  case self::WORKSPACE_OBJECT_ID:
626  // only files and blogs can be shared for now
627  if ($this->checkPermissionBool("edit_permission") && in_array($this->type, array("file", "blog")) && $this->node_id) {
628  $ilTabs->addTab(
629  "id_permissions",
630  $lng->txt("wsp_permissions"),
631  $this->ctrl->getLinkTargetByClass(array(get_class($this), "ilworkspaceaccessgui"), "share")
632  );
633  }
634  break;
635  }
636  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
global $DIC
Definition: saml.php:7
+ 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 491 of file class.ilObject2GUI.php.

492  {
493  return parent::setTargetFrame($a_cmd, $a_target_frame);
494  }

◆ setTitleAndDescription()

ilObject2GUI::setTitleAndDescription ( )
protected

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

475  {
476  return parent::setTitleAndDescription();
477  }

◆ showActions()

ilObject2GUI::showActions ( )
finalprotected

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

653  {
654  die("ilObject2GUI::showActions() is deprecated.");
655  }

◆ showPossibleSubObjects()

ilObject2GUI::showPossibleSubObjects ( )
finalprotected

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

518  {
519  return parent::showPossibleSubObjects();
520  }

◆ showUpperIcon()

ilObject2GUI::showUpperIcon ( )
finalprotected

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

479  {
480  return parent::showUpperIcon();
481  }

◆ trash()

ilObject2GUI::trash ( )
final

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

523  {
524  return parent::trashObject();
525  } // done

◆ undelete()

ilObject2GUI::undelete ( )
final

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

528  {
529  return parent::undeleteObject();
530  } // done

◆ update()

ilObject2GUI::update ( )

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

719  {
720  parent::updateObject();
721  }

◆ view()

ilObject2GUI::view ( )

view object content (repository/workspace switch)

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

582  {
583  switch ($this->id_type) {
584  case self::REPOSITORY_NODE_ID:
585  case self::REPOSITORY_OBJECT_ID:
586  return parent::viewObject();
587 
588  case self::WORKSPACE_NODE_ID:
589  case self::WORKSPACE_OBJECT_ID:
590  return $this->render();
591 
592  case self::OBJECT_ID:
593  case self::PORTFOLIO_OBJECT_ID:
594  // :TODO: should this ever occur? do nothing or edit() ?!
595  break;
596  }
597  }

◆ withReferences()

ilObject2GUI::withReferences ( )
final

Final/Private declaration of unchanged parent methods.

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

459  {
460  return parent::withReferences();
461  }

Field Documentation

◆ $access_handler

◆ $creation_forms

ilObject2GUI::$creation_forms = array()
protected

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

◆ $id_type

ilObject2GUI::$id_type = array()
protected

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

◆ $node_id

◆ $object_id

ilObject2GUI::$object_id
protected

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

Referenced by __construct().

◆ $parent_id

◆ $tree

◆ OBJECT_ID

const ilObject2GUI::OBJECT_ID = 0

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

Referenced by ilObjTaxonomyGUI\__construct().

◆ PORTFOLIO_OBJECT_ID

const ilObject2GUI::PORTFOLIO_OBJECT_ID = 5

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

Referenced by ilSharedResourceGUI\executeCommand().

◆ REPOSITORY_NODE_ID

◆ REPOSITORY_OBJECT_ID

const ilObject2GUI::REPOSITORY_OBJECT_ID = 3

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

◆ WORKSPACE_NODE_ID

◆ WORKSPACE_OBJECT_ID


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