ILIAS  release_4-4 Revision
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 ()
 
 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 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 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...
 
 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...
 

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 ()
 
 setTitleAndDescription ()
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 
 setTargetFrame ($a_cmd, $a_target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 setColumnSettings ($column_gui)
 
 checkPermission ($a_perm, $a_cmd="")
 
 showPossibleSubObjects ()
 
 redirectToRefId ()
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 
 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)
 
- 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 public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 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)
 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
 

Private Member Functions

 displayList ()
 

Additional Inherited Members

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

Detailed Description

New implementation of ilObjectGUI.

(beta)

Differences to the ilObject implementation:

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

All new modules should derive from this class.

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

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

Parameters
int$a_id
int$a_id_type
int$a_parent_node_id

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

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

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

Member Function Documentation

◆ __initTableGUI()

ilObject2GUI::__initTableGUI ( )
finalprotected

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

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

◆ __setTableGUIBasicData()

ilObject2GUI::__setTableGUIBasicData ( )
finalprotected

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

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

◆ __showButton()

ilObject2GUI::__showButton ( )
finalprotected

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

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

◆ addAdminLocatorItems()

ilObject2GUI::addAdminLocatorItems ( )
finalprotected

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

Referenced by ilObjectPluginGUI\executeCommand().

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

◆ addLocatorItems()

ilObject2GUI::addLocatorItems ( )
protected

Functions to be overwritten.

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

References getType().

Referenced by setLocator().

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

◆ afterConstructor()

ilObject2GUI::afterConstructor ( )
protected

Do anything that should be done after constructor in here.

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

Referenced by __construct().

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

◆ assignObject()

ilObject2GUI::assignObject ( )
finalprotected

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

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

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

Referenced by __construct().

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

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

◆ cancel()

ilObject2GUI::cancel ( )

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

583 { parent::cancelObject(); }

◆ cancelDelete()

ilObject2GUI::cancelDelete ( )
final

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

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

◆ checkPermission()

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

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

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

711  {
712  global $ilUser;
713 
714  if($a_perm == "create")
715  {
716  if(!$a_node_id)
717  {
718  $a_node_id = $this->parent_id;
719  }
720  if($a_node_id)
721  {
722  return $this->getAccessHandler()->checkAccess($a_perm."_".$a_type, $a_cmd, $a_node_id);
723  }
724  }
725  else
726  {
727 
728  if (!$a_node_id)
729  {
730  $a_node_id = $this->node_id;
731  }
732  if($a_node_id)
733  {
734  return $this->getAccessHandler()->checkAccess($a_perm, $a_cmd, $a_node_id);
735  }
736  }
737 
738  // if we do not have a node id, check if current user is owner
739  if($this->obj_id && $this->object->getOwner() == $ilUser->getId())
740  {
741  return true;
742  }
743  return false;
744  }
getAccessHandler()
Get access handler.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneAll()

ilObject2GUI::cloneAll ( )
final

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

471 { return parent::cloneAllObject(); }

◆ confirmedDelete()

ilObject2GUI::confirmedDelete ( )

Delete objects (repository/workspace switch)

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

References deleteConfirmedObjects().

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

◆ create()

ilObject2GUI::create ( )

Deleted in ilObject.

CRUD

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

Referenced by ilObjTaxonomyGUI\createAssignedTaxonomy().

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

◆ delete()

ilObject2GUI::delete ( )

Display delete confirmation form (repository/workspace switch)

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

References deleteConfirmation().

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

◆ deleteConfirmation()

ilObject2GUI::deleteConfirmation ( )
protected

Display delete confirmation form (workspace specific)

This should probably be moved elsewhere as done with RepUtil

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

References $_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().

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

◆ deleteConfirmedObjects()

ilObject2GUI::deleteConfirmedObjects ( )
protected

Delete objects (workspace specific)

This should probably be moved elsewhere as done with RepUtil

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

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

Referenced by confirmedDelete().

402  {
403  global $lng, $objDefinition;
404 
405  if(sizeof($_POST["id"]))
406  {
407  foreach($_POST["id"] as $node_id)
408  {
409  $node = $this->tree->getNodeData($node_id);
410 
411  // tree/reference
412  $this->tree->deleteReference($node_id);
413  $this->tree->deleteTree($node);
414 
415  // permission
416  $this->getAccessHandler()->removePermission($node_id);
417 
418  // object
419  $object = ilObjectFactory::getInstanceByObjId($node["obj_id"], false);
420  if($object)
421  {
422  $object->delete();
423  }
424  }
425 
426  ilUtil::sendSuccess($lng->txt("msg_removed"), true);
427  }
428  else
429  {
430  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
431  }
432 
433  $this->ctrl->redirect($this, "");
434  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
getAccessHandler()
Get access handler.
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.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayList()

ilObject2GUI::displayList ( )
finalprivate

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

475 { return parent::displayList(); }

◆ edit()

ilObject2GUI::edit ( )

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

581 { parent::editObject(); }

◆ executeCommand()

& ilObject2GUI::executeCommand ( )

execute command

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

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

Referenced by ilObjPortfolioTemplateGUI\executeCommand().

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

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

◆ fillCloneTemplate()

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

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

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

468 { return parent::fillCloneTemplate($a_tpl_varname,$a_type); }
+ Here is the caller graph for this function:

◆ getAccessHandler()

◆ getCenterColumnHTML()

ilObject2GUI::getCenterColumnHTML ( )
finalprotected

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

452 { return parent::getCenterColumnHTML(); }

◆ getCreationMode()

◆ getHTML()

ilObject2GUI::getHTML ( )

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

436 { return parent::getHTML(); }

◆ getPermanentLinkWidget()

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

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

References getType().

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

806  {
807  if($this->id_type == self::WORKSPACE_NODE_ID)
808  {
809  $a_append .= "_wsp";
810  }
811 
812  include_once('Services/PermanentLink/classes/class.ilPermanentLinkGUI.php');
813  $plink = new ilPermanentLinkGUI($this->getType(), $this->node_id , $a_append);
814  $plink->setIncludePermanentLinkText(false);
815  $plink->setAlignCenter($a_center);
816  return $plink->getHTML();
817  }
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 ( )
finalprotected

Deprecated functions.

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

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

◆ getRightColumnHTML()

ilObject2GUI::getRightColumnHTML ( )
finalprotected

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

453 { return parent::getRightColumnHTML(); }

◆ getTabs()

ilObject2GUI::getTabs ( )
finalprotected

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

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

◆ getTargetFrame()

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

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

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

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

◆ getTitlesByRefId()

ilObject2GUI::getTitlesByRefId ( )
finalprotected

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

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

◆ getType()

◆ handleAutoRating()

ilObject2GUI::handleAutoRating ( ilObject  $a_new_obj)
protected

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

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

821  {
822  // only needed in repository
823  if($this->id_type == self::REPOSITORY_NODE_ID)
824  {
825  parent::handleAutoRating($a_new_obj);
826  }
827  }
+ Here is the caller graph for this function:

◆ hitsperpageObject()

ilObject2GUI::hitsperpageObject ( )
finalprotected

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

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

◆ importFile()

ilObject2GUI::importFile ( )

Import.

public

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

612  {
613  parent::importFileObject($this->parent_id);
614  }

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

594  {
595  $forms = parent::initCreationForms($a_new_type);
596 
597  // cloning doesn't work in workspace yet
598  if($this->id_type == self::WORKSPACE_NODE_ID)
599  {
600  unset($forms[self::CFORM_CLONE]);
601  }
602 
603  return $forms;
604  }

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

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

Referenced by ilObjCloudGUI\addHeaderAction().

754  {
755  global $ilAccess;
756 
757  if($this->id_type == self::WORKSPACE_NODE_ID)
758  {
759  if(!$this->creation_mode && $this->object_id)
760  {
761  include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
763  $this->getAccessHandler(), $this->getType(), $this->node_id, $this->object_id);
764 
765  $dispatcher->setSubObject($a_sub_type, $a_sub_id);
766 
767  include_once "Services/Object/classes/class.ilObjectListGUI.php";
768  ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
769  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false),
770  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false));
771 
772  $lg = $dispatcher->initHeaderAction();
773 
774  if(is_object($lg))
775  {
776  // to enable add to desktop / remove from desktop
777  if($this instanceof ilDesktopItemHandling)
778  {
779  $lg->setContainerObject($this);
780  }
781 
782  // for activation checks see ilObjectGUI
783  // $lg->enableComments(true);
784  $lg->enableNotes(true);
785  // $lg->enableTags(true);
786  }
787 
788  return $lg;
789  }
790  }
791  else
792  {
793  return parent::initHeaderAction();
794  }
795  }
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 ( )
final

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

451 { return parent::isVisible(); }

◆ omitLocator()

ilObject2GUI::omitLocator (   $a_omit = true)
finalprotected

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

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

◆ prepareOutput()

◆ putObjectInTree()

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

Add object to tree at given position.

Parameters
ilObject$a_obj
int$a_parent_node_id

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

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

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

623  {
624  global $rbacreview, $ilUser, $objDefinition;
625 
626  $this->object_id = $a_obj->getId();
627 
628  if(!$a_parent_node_id)
629  {
630  $a_parent_node_id = $this->parent_id;
631  }
632 
633  // add new object to custom parent container
634  if((int)$_REQUEST["crtptrefid"])
635  {
636  $a_parent_node_id = (int)$_REQUEST["crtptrefid"];
637  }
638 
639  switch($this->id_type)
640  {
641  case self::REPOSITORY_NODE_ID:
642  case self::REPOSITORY_OBJECT_ID:
643  if(!$this->node_id)
644  {
645  $a_obj->createReference();
646  $this->node_id = $a_obj->getRefId();
647  }
648  $a_obj->putInTree($a_parent_node_id);
649  $a_obj->setPermissions($a_parent_node_id);
650 
651  // rbac log
652  include_once "Services/AccessControl/classes/class.ilRbacLog.php";
653  $rbac_log_roles = $rbacreview->getParentRoleIds($this->node_id, false);
654  $rbac_log = ilRbacLog::gatherFaPa($this->node_id, array_keys($rbac_log_roles), true);
655  ilRbacLog::add(ilRbacLog::CREATE_OBJECT, $this->node_id, $rbac_log);
656 
657  $this->ctrl->setParameter($this, "ref_id", $this->node_id);
658  break;
659 
660  case self::WORKSPACE_NODE_ID:
661  case self::WORKSPACE_OBJECT_ID:
662  if(!$this->node_id)
663  {
664  $this->node_id = $this->tree->insertObject($a_parent_node_id, $this->object_id);
665  }
666  $this->getAccessHandler()->setPermissions($a_parent_node_id, $this->node_id);
667 
668  $this->ctrl->setParameter($this, "wsp_id", $this->node_id);
669  break;
670 
671  case self::OBJECT_ID:
672  case self::PORTFOLIO_OBJECT_ID:
673  // do nothing
674  break;
675  }
676 
677  // BEGIN ChangeEvent: Record save object.
678  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
679  ilChangeEvent::_recordWriteEvent($this->object_id, $ilUser->getId(), 'create');
680  // END ChangeEvent: Record save object.
681 
682  // use forced callback after object creation
683  if($_REQUEST["crtcb"])
684  {
685  $callback_type = ilObject::_lookupType((int)$_REQUEST["crtcb"], true);
686  $class_name = "ilObj".$objDefinition->getClassName($callback_type)."GUI";
687  $location = $objDefinition->getLocation($callback_type);
688  include_once($location."/class.".$class_name.".php");
689  if (in_array(strtolower($class_name), array("ilobjitemgroupgui")))
690  {
691  $callback_obj = new $class_name((int)$_REQUEST["crtcb"]);
692  }
693  else
694  {
695  $callback_obj = new $class_name(null, (int)$_REQUEST["crtcb"], true, false);
696  }
697  $callback_obj->afterSaveCallback($a_obj);
698  }
699  }
$location
Definition: buildRTE.php:44
getAccessHandler()
Get access handler.
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
putInTree($a_parent_ref)
maybe this method should be in tree object!?
static _lookupType($a_id, $a_reference=false)
lookup object type
global $ilUser
Definition: imgupload.php:15
static add($a_action, $a_ref_id, array $a_diff, $a_source_ref_id=false)
getRefId()
get reference id public
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
setPermissions($a_parent_ref)
set permissions of object
_recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redirectToRefId()

ilObject2GUI::redirectToRefId ( )
finalprotected

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

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

◆ redrawHeaderAction()

ilObject2GUI::redrawHeaderAction ( )
protected

Updating icons after ajax call.

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

801  {
802  parent::redrawHeaderActionObject();
803  }

◆ removeFromSystem()

ilObject2GUI::removeFromSystem ( )
final

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

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

◆ save()

ilObject2GUI::save ( )

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

580 { parent::saveObject(); }

◆ searchCloneSource()

ilObject2GUI::searchCloneSource ( )
finalprotected

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

470 { return parent::searchCloneSourceObject(); }

◆ setColumnSettings()

ilObject2GUI::setColumnSettings (   $column_gui)
finalprotected

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

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

◆ setCreationMode()

ilObject2GUI::setCreationMode (   $a_mode = true)
final

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

Referenced by ilObjMediaPoolGUI\executeCommand().

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

◆ setLocator()

ilObject2GUI::setLocator ( )
finalprotected

set Locator

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

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

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

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

◆ setReturnLocation()

ilObject2GUI::setReturnLocation ( )
finalprotected

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

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

◆ setTabs()

ilObject2GUI::setTabs ( )
protected

create tabs (repository/workspace switch)

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

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

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

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

508  {
509  global $ilTabs, $lng;
510 
511  switch($this->id_type)
512  {
513  case self::REPOSITORY_NODE_ID:
514  case self::REPOSITORY_OBJECT_ID:
515  if ($this->checkPermissionBool("edit_permission"))
516  {
517  $ilTabs->addTab("id_permissions",
518  $lng->txt("perm_settings"),
519  $this->ctrl->getLinkTargetByClass(array(get_class($this), "ilpermissiongui"), "perm"));
520  }
521  break;
522 
523  case self::WORKSPACE_NODE_ID:
524  case self::WORKSPACE_OBJECT_ID:
525  // only files and blogs can be shared for now
526  if ($this->checkPermissionBool("edit_permission") && in_array($this->type, array("file", "blog")) && $this->node_id)
527  {
528  $ilTabs->addTab("id_permissions",
529  $lng->txt("wsp_permissions"),
530  $this->ctrl->getLinkTargetByClass(array(get_class($this), "ilworkspaceaccessgui"), "share"));
531  }
532  break;
533  }
534  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
+ 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 450 of file class.ilObject2GUI.php.

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

◆ setTitleAndDescription()

ilObject2GUI::setTitleAndDescription ( )
protected

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

445 { return parent::setTitleAndDescription(); }

◆ showActions()

ilObject2GUI::showActions ( )
finalprotected

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

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

◆ showPossibleSubObjects()

ilObject2GUI::showPossibleSubObjects ( )
finalprotected

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

458 { return parent::showPossibleSubObjects(); }

◆ showUpperIcon()

ilObject2GUI::showUpperIcon ( )
finalprotected

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

446 { return parent::showUpperIcon(); }

◆ trash()

ilObject2GUI::trash ( )
final

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

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

◆ undelete()

ilObject2GUI::undelete ( )
final

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

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

◆ update()

ilObject2GUI::update ( )

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

582 { parent::updateObject(); }

◆ view()

ilObject2GUI::view ( )

view object content (repository/workspace switch)

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

484  {
485  switch($this->id_type)
486  {
487  case self::REPOSITORY_NODE_ID:
488  case self::REPOSITORY_OBJECT_ID:
489  return parent::viewObject();
490 
491  case self::WORKSPACE_NODE_ID:
492  case self::WORKSPACE_OBJECT_ID:
493  return $this->render();
494 
495  case self::OBJECT_ID:
496  case self::PORTFOLIO_OBJECT_ID:
497  // :TODO: should this ever occur? do nothing or edit() ?!
498  break;
499  }
500  }

◆ withReferences()

ilObject2GUI::withReferences ( )
final

Final/Private declaration of unchanged parent methods.

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

441 { return parent::withReferences(); }

Field Documentation

◆ $access_handler

◆ $creation_forms

ilObject2GUI::$creation_forms = array()
protected

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

◆ $id_type

ilObject2GUI::$id_type = array()
protected

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

◆ $node_id

◆ $object_id

ilObject2GUI::$object_id
protected

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

Referenced by __construct().

◆ $parent_id

◆ $tree

◆ OBJECT_ID

const ilObject2GUI::OBJECT_ID = 0

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

Referenced by ilObjTaxonomyGUI\__construct().

◆ PORTFOLIO_OBJECT_ID

const ilObject2GUI::PORTFOLIO_OBJECT_ID = 5

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

Referenced by ilSharedResourceGUI\executeCommand().

◆ REPOSITORY_NODE_ID

◆ REPOSITORY_OBJECT_ID

const ilObject2GUI::REPOSITORY_OBJECT_ID = 3

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

◆ WORKSPACE_NODE_ID

◆ WORKSPACE_OBJECT_ID


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