ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObject2GUI Class Reference

New implementation of ilObjectGUI. More...

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

Public Member Functions

 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 delete ()
 Display delete confirmation form (repository/workspace switch) More...
 
 confirmedDelete ()
 Delete objects (repository/workspace switch) More...
 
 getHTML ()
 
 withReferences ()
 Final/Private declaration of unchanged parent methods. More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 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 @access 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...
 

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 ()
 called by prepare output More...
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (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...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) 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...
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 showActions ()
 
 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...
 
 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
 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 @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 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
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Private Member Functions

 displayList ()
 

Detailed Description

New implementation of ilObjectGUI.

(beta)

Differences to the ilObject implementation:

  • no $this->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

Reimplemented in ilObjBibliographicGUI, ilObjBlogGUI, ilObjCloudGUI, ilObjFileGUI, ilObjItemGroupGUI, ilObjMediaPoolGUI, ilObjPollGUI, ilObjPortfolioBaseGUI, ilObjPortfolioTemplateGUI, ilObjRemoteCategoryGUI, ilObjRemoteCourseGUI, ilObjRemoteFileGUI, ilObjRemoteGlossaryGUI, ilObjRemoteGroupGUI, ilObjRemoteLearningModuleGUI, ilObjRemoteTestGUI, ilObjRemoteWikiGUI, ilObjWikiSettingsGUI, ilObjWorkspaceFolderGUI, ilObjWorkspaceRootFolderGUI, ilObjContactAdministrationGUI, ilObjHelpSettingsGUI, ilRemoteObjectBaseGUI, ilOrgUnitExtensionGUI, and ilObjectPluginGUI.

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

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
64 if (!isset($ilErr)) {
65 $ilErr = new ilErrorHandling();
66 $ilErr->setErrorHandling(PEAR_ERROR_CALLBACK, array($ilErr,'errorHandler'));
67 } else {
68 $this->ilErr = $ilErr;
69 }
70
71 $this->id_type = $a_id_type;
72 $this->parent_id = $a_parent_node_id;
73 $this->type = $this->getType();
74 $this->html = "";
75
76 // use globals instead?
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) {
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
105 $this->object_id = $a_id;
106 $this->tree = $tree;
107 $this->access_handler = $ilAccess;
108 $params[] = "obj_id"; // ???
109 break;
110
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
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
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 }
user()
Definition: user.php:4
html()
const PEAR_ERROR_CALLBACK
Definition: PEAR.php:35
getType()
Functions that must be overwritten.
assignObject()
create object instance as internal property (repository/workspace switch)
afterConstructor()
Do anything that should be done after constructor in here.
static _lookupObjectId($a_ref_id)
lookup object id
Access handler for portfolio.
Access handler for personal workspace.
Tree handler for personal workspace.
global $ilCtrl
Definition: ilias.php:18
global $DIC
Definition: saml.php:7
$ilUser
Definition: imgupload.php:18
$params
Definition: disable.php:11

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

+ Here is the call graph for this function:

Member Function Documentation

◆ __initTableGUI()

& ilObject2GUI::__initTableGUI ( )
finalprotected

Reimplemented from ilObjectGUI.

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

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

◆ __setTableGUIBasicData()

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

standard implementation for tables use 'from' variable use different initial setting of table

Reimplemented from ilObjectGUI.

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

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

◆ __showButton()

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

Reimplemented from ilObjectGUI.

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

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

◆ addAdminLocatorItems()

ilObject2GUI::addAdminLocatorItems (   $a_do_not_add_object = false)
finalprotected

should be overwritten to add object specific items (repository items are preloaded)

Parameters
bool$a_do_not_add_object

Reimplemented from ilObjectGUI.

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

574 {
575 return parent::addAdminLocatorItems($a_do_not_add_object);
576 }

Referenced by ilObjectPluginGUI\executeCommand().

+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObject2GUI::addLocatorItems ( )
protected

Functions to be overwritten.

Reimplemented from ilObjectGUI.

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

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

682 {
683 }

Referenced by setLocator().

+ Here is the caller graph for this function:

◆ afterConstructor()

ilObject2GUI::afterConstructor ( )
protected

Do anything that should be done after constructor in here.

Reimplemented in ilObjItemGroupGUI, and ilObjMediaPoolGUI.

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

179 {
180 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ assignObject()

ilObject2GUI::assignObject ( )
finalprotected

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

Reimplemented from ilObjectGUI.

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

218 {
219 if ($this->object_id != 0) {
220 switch ($this->id_type) {
221 case self::OBJECT_ID:
225 $this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
226 break;
227
229 $this->object = ilObjectFactory::getInstanceByRefId($this->node_id);
230 break;
231
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

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

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

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

◆ buildCloneSelect()

ilObject2GUI::buildCloneSelect (   $existing_objs)
finalprotected

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

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

◆ cancel()

ilObject2GUI::cancel ( )

Reimplemented in ilObjTaxonomyGUI.

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

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

◆ 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

Check permission and redirect on error.

Parameters
string$a_perm
string$a_cmd
string$a_type
int$a_ref_id
Exceptions
ilObjectException
Returns
bool

Reimplemented from ilObjectGUI.

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

512 {
513 return parent::checkPermission($a_perm, $a_cmd, $a_type, $a_ref_id);
514 }
$a_type
Definition: workflow.php:92

References $a_type.

Referenced by ilObjHelpSettingsGUI\activateModule(), ilObjLinkResourceGUI\addLink(), ilObjMediaPoolGUI\allMedia(), 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(), ilObjBlogGUI\editStyleProperties(), ilObjPortfolioBaseGUI\editStyleProperties(), ilObjCloudGUI\executeCommand(), ilObjMediaPoolGUI\executeCommand(), ilObjPortfolioGUI\executeCommand(), ilObjLinkResourceGUI\executeCommand(), ilObjectPluginGUI\executeCommand(), ilObjLinkResourceGUI\history(), ilObjectPluginGUI\infoScreen(), ilObjBlogGUI\infoScreenForward(), ilObjPortfolioTemplateGUI\infoScreenForward(), ilObjLinkResourceGUI\infoScreenForward(), ilObjMediaPoolGUI\insertFromClipboard(), ilObjLinkResourceGUI\linkChecker(), ilObjItemGroupGUI\listMaterials(), ilObjMediaPoolGUI\listMedia(), ilObjLinkResourceGUI\manage(), ilObjMediaPoolGUI\openClipboard(), ilObjMediaPoolGUI\remove(), ilObjLinkResourceGUI\saveAddLink(), ilObjContactAdministrationGUI\saveConfigurationForm(), ilObjMediaPoolGUI\saveFolder(), ilObjItemGroupGUI\saveItemAssignment(), ilObjMediaPoolGUI\saveMediaPoolPage(), ilObjLinkResourceGUI\saveSettings(), ilObjLinkResourceGUI\saveSorting(), ilObjMediaPoolGUI\selectUploadDirFiles(), ilObjHelpSettingsGUI\setMode(), ilObjLinkResourceGUI\settings(), ilObjContactAdministrationGUI\showConfigurationForm(), ilObjLinkResourceGUI\showLinks(), ilObjMediaPoolGUI\showMedia(), ilObjMediaPoolGUI\showMediaPoolPageUsages(), ilObjMediaPoolGUI\showPreview(), ilObjLinkResourceGUI\sort(), ilObjMediaPoolGUI\updateFolder(), ilObjLinkResourceGUI\updateLinks(), ilObjMediaPoolGUI\updateMediaPoolPage(), and ilObjLinkResourceGUI\view().

+ Here is the caller graph for this function:

◆ checkPermissionBool()

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

Check permission.

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

Reimplemented from ilObjectGUI.

Reimplemented in ilObjPortfolioGUI, and ilObjTaxonomyGUI.

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

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

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

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

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

◆ cloneAll()

ilObject2GUI::cloneAll ( )
final

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

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

◆ confirmedDelete()

ilObject2GUI::confirmedDelete ( )

Delete objects (repository/workspace switch)

Reimplemented in ilObjTaxonomyGUI.

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

389 {
390 switch ($this->id_type) {
393 return parent::confirmedDeleteObject();
394
397 return $this->deleteConfirmedObjects();
398
399 case self::OBJECT_ID:
401 // :TODO: should this ever occur?
402 break;
403 }
404 }
deleteConfirmedObjects()
Delete objects (workspace specific)

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

+ Here is the call graph for this function:

◆ create()

ilObject2GUI::create ( )

Deleted in ilObject.

CRUD

Reimplemented in ilObjCourseVerificationGUI, ilObjExerciseVerificationGUI, ilObjSCORMVerificationGUI, and ilObjTestVerificationGUI.

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

708 {
709 parent::createObject();
710 }

Referenced by ilObjTaxonomyGUI\createAssignedTaxonomy().

+ Here is the caller graph for this function:

◆ delete()

ilObject2GUI::delete ( )

Display delete confirmation form (repository/workspace switch)

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

309 {
310 switch ($this->id_type) {
313 return parent::deleteObject();
314
317 return $this->deleteConfirmation();
318
319 case self::OBJECT_ID:
321 // :TODO: should this ever occur?
322 break;
323 }
324 }
deleteConfirmation()
Display delete confirmation form (workspace specific)

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

+ Here is the call graph for this function:

◆ deleteConfirmation()

ilObject2GUI::deleteConfirmation ( )
protected

Display delete confirmation form (workspace specific)

This should probably be moved elsewhere as done with RepUtil

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

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,
377 $lng->txt("icon") . " " . $lng->txt("obj_" . $type)
378 );
379 }
380 }
381
382 $tpl->setContent($cgui->getHTML());
383 }
Confirmation screen class.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
static getClassByType($a_obj_type)
Get class by type.
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$type

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

Referenced by delete().

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

◆ deleteConfirmedObjects()

ilObject2GUI::deleteConfirmedObjects ( )
protected

Delete objects (workspace specific)

This should probably be moved elsewhere as done with RepUtil

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

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 }
$_POST["username"]
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

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

Referenced by confirmedDelete().

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

◆ displayList()

ilObject2GUI::displayList ( )
finalprivate

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

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

◆ edit()

ilObject2GUI::edit ( )

Reimplemented in ilObjFileGUI, ilObjMediaPoolGUI, and ilObjWorkspaceFolderGUI.

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

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

◆ executeCommand()

ilObject2GUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

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

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

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 }
prepareOutput($a_show_subobjects=true)
prepare output

References getAccessHandler(), and prepareOutput().

Referenced by ilObjPortfolioTemplateGUI\executeCommand().

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

◆ fillCloneSearchTemplate()

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

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

550 {
551 return parent::fillCloneSearchTemplate($a_tpl_varname, $a_type);
552 }

References $a_type.

◆ fillCloneTemplate()

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

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

@access public

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

Reimplemented from ilObjectGUI.

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

546 {
547 return parent::fillCloneTemplate($a_tpl_varname, $a_type);
548 }

References $a_type.

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

+ Here is the caller graph for this function:

◆ getAccessHandler()

◆ getCenterColumnHTML()

ilObject2GUI::getCenterColumnHTML ( )
finalprotected

Get center column.

Reimplemented from ilObjectGUI.

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

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

◆ getCreationMode()

◆ getHTML()

ilObject2GUI::getHTML ( )

Reimplemented from ilObjectGUI.

Reimplemented in ilObjBlogGUI, and ilObjPollGUI.

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

953 {
954 if ($this->id_type == self::WORKSPACE_NODE_ID) {
955 $a_append .= "_wsp";
956 }
957
958 include_once('Services/PermanentLink/classes/class.ilPermanentLinkGUI.php');
959 $plink = new ilPermanentLinkGUI($this->getType(), $this->node_id, $a_append);
960 $plink->setIncludePermanentLinkText(false);
961 $plink->setAlignCenter($a_center);
962 return $plink->getHTML();
963 }
Class for permanent links.

References getType().

+ Here is the call graph for this function:

◆ getReturnLocation()

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

Deprecated functions.

Reimplemented from ilObjectGUI.

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

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

◆ getRightColumnHTML()

ilObject2GUI::getRightColumnHTML ( )
finalprotected

Display right column.

Reimplemented from ilObjectGUI.

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

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

◆ getTabs()

ilObject2GUI::getTabs ( )
finalprotected

get tabs abstract method.

@abstract overwrite in derived GUI class of your object type @access public

Parameters
objectinstance of ilTabsGUI

Reimplemented from ilObjectGUI.

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

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

◆ getTargetFrame()

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

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

"perm")

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

Reimplemented from ilObjectGUI.

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

488 {
489 return parent::getTargetFrame($a_cmd, $a_target_frame);
490 }

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

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

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

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

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

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

◆ handleAutoRating()

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

Reimplemented from ilObjectGUI.

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

970 {
971 // only needed in repository
972 if ($this->id_type == self::REPOSITORY_NODE_ID) {
973 parent::handleAutoRating($a_new_obj);
974 }
975 }

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

+ Here is the caller graph for this function:

◆ hitsperpageObject()

ilObject2GUI::hitsperpageObject ( )
finalprotected

Reimplemented from ilObjectGUI.

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

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

◆ importFile()

ilObject2GUI::importFile ( )

Import.

@access public

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

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

◆ initCreationForms()

ilObject2GUI::initCreationForms (   $a_new_type)
protected

Init creation froms.

this will create the default creation forms: new, import, clone

Parameters
string$a_new_type
Returns
array

Reimplemented from ilObjectGUI.

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

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

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

◆ initHeaderAction()

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

Add header action menu.

Parameters
string$a_sub_type
int$a_sub_id
Returns
ilObjectListGUI

Reimplemented from ilObjectGUI.

Reimplemented in ilObjFileGUI.

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

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

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

Referenced by ilObjCloudGUI\addHeaderAction().

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

◆ isVisible()

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

Reimplemented from ilObjectGUI.

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

496 {
497 return parent::isVisible($a_ref_id, $a_type);
498 }

References $a_type.

◆ omitLocator()

ilObject2GUI::omitLocator (   $a_omit = true)
finalprotected

Reimplemented from ilObjectGUI.

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

Reimplemented from ilObjectGUI.

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

765 {
766 global $DIC;
767
768 $rbacreview = $DIC["rbacreview"];
769 $ilUser = $DIC["ilUser"];
770
771
772 $this->object_id = $a_obj->getId();
773
774 if (!$a_parent_node_id) {
775 $a_parent_node_id = $this->parent_id;
776 }
777
778 // add new object to custom parent container
779 if ((int) $_REQUEST["crtptrefid"]) {
780 $a_parent_node_id = (int) $_REQUEST["crtptrefid"];
781 }
782
783 switch ($this->id_type) {
786 if (!$this->node_id) {
787 $a_obj->createReference();
788 $this->node_id = $a_obj->getRefId();
789 }
790 $a_obj->putInTree($a_parent_node_id);
791 $a_obj->setPermissions($a_parent_node_id);
792
793 // rbac log
794 include_once "Services/AccessControl/classes/class.ilRbacLog.php";
795 $rbac_log_roles = $rbacreview->getParentRoleIds($this->node_id, false);
796 $rbac_log = ilRbacLog::gatherFaPa($this->node_id, array_keys($rbac_log_roles), true);
797 ilRbacLog::add(ilRbacLog::CREATE_OBJECT, $this->node_id, $rbac_log);
798
799 $this->ctrl->setParameter($this, "ref_id", $this->node_id);
800 break;
801
804 if (!$this->node_id) {
805 $this->node_id = $this->tree->insertObject($a_parent_node_id, $this->object_id);
806 }
807 $this->getAccessHandler()->setPermissions($a_parent_node_id, $this->node_id);
808
809 $this->ctrl->setParameter($this, "wsp_id", $this->node_id);
810 break;
811
812 case self::OBJECT_ID:
814 // do nothing
815 break;
816 }
817
818 // BEGIN ChangeEvent: Record save object.
819 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
820 ilChangeEvent::_recordWriteEvent($this->object_id, $ilUser->getId(), 'create');
821 // END ChangeEvent: Record save object.
822
823 // use forced callback after object creation
824 self::handleAfterSaveCallback($a_obj, $_REQUEST["crtcb"]);
825 }
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
static handleAfterSaveCallback(ilObject $a_obj, $a_callback_ref_id)
After creation callback.
createReference()
creates reference for object
setPermissions($a_parent_ref)
set permissions of object
getRefId()
get reference id @access public
getId()
get object id @access public
putInTree($a_parent_ref)
maybe this method should be in tree object!?
static add($a_action, $a_ref_id, array $a_diff, $a_source_ref_id=false)
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
const CREATE_OBJECT

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

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

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

◆ redirectToRefId()

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

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

Parameters
int$a_ref_idreference id

Reimplemented from ilObjectGUI.

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

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

◆ removeFromSystem()

ilObject2GUI::removeFromSystem ( )
final

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

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

◆ save()

◆ 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

May be overwritten in subclasses.

Reimplemented from ilObjectGUI.

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

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

◆ setCreationMode()

ilObject2GUI::setCreationMode (   $a_mode = true)
final

if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui

Reimplemented from ilObjectGUI.

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

463 {
464 return parent::setCreationMode($a_mode);
465 }

Referenced by ilObjMediaPoolGUI\executeCommand().

+ Here is the caller graph for this function:

◆ setLocator()

ilObject2GUI::setLocator ( )
protected

set Locator

Reimplemented from ilObjectGUI.

Reimplemented in ilOrgUnitExtensionGUI.

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

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) {
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
300 // :TODO:
301 break;
302 }
303 }
$_GET["client_id"]
addLocatorItems()
Functions to be overwritten.

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

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

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

◆ setReturnLocation()

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

set specific return location for command

Parameters
string$a_cmdcommand
string$a_locationdefault return location (is returned, if no special return location was set) @access public

Reimplemented from ilObjectGUI.

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

Reimplemented from ilObjectGUI.

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

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

605 {
606 global $DIC;
607
608 $ilTabs = $DIC["ilTabs"];
609 $lng = $DIC["lng"];
610
611
612 switch ($this->id_type) {
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
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 }

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

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

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

◆ setTargetFrame()

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

set specific target frame for command

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

Reimplemented from ilObjectGUI.

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

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

◆ setTitleAndDescription()

ilObject2GUI::setTitleAndDescription ( )
protected

called by prepare output

Reimplemented from ilObjectGUI.

Reimplemented in ilObjPortfolioGUI, and ilObjWorkspaceRootFolderGUI.

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

show possible subobjects (pulldown menu)

@access public

Reimplemented from ilObjectGUI.

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

Reimplemented in ilObjFileGUI, and ilObjWorkspaceFolderGUI.

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

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

◆ view()

ilObject2GUI::view ( )

view object content (repository/workspace switch)

Reimplemented in ilObjBibliographicGUI, ilObjPortfolioBaseGUI, and ilObjLinkResourceGUI.

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

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

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

◆ withReferences()

ilObject2GUI::withReferences ( )
final

Final/Private declaration of unchanged parent methods.

Reimplemented from ilObjectGUI.

Definition at line 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

◆ PORTFOLIO_OBJECT_ID

const ilObject2GUI::PORTFOLIO_OBJECT_ID = 5

◆ REPOSITORY_NODE_ID

◆ REPOSITORY_OBJECT_ID

const ilObject2GUI::REPOSITORY_OBJECT_ID = 3

◆ WORKSPACE_NODE_ID

◆ WORKSPACE_OBJECT_ID


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