ILIAS  release_7 Revision v7.30-3-g800a261c036
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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

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

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 ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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...
 
 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
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 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
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

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, ilObjCmiXapiGUI, ilObjContentPageGUI, ilObjFileGUI, ilObjItemGroupGUI, ilObjLTIConsumerGUI, ilObjMediaPoolGUI, ilObjPollGUI, ilObjPortfolioBaseGUI, ilObjPortfolioTemplateGUI, ilObjRemoteCategoryGUI, ilObjRemoteCourseGUI, ilObjRemoteFileGUI, ilObjRemoteGlossaryGUI, ilObjRemoteGroupGUI, ilObjRemoteLearningModuleGUI, ilObjRemoteTestGUI, ilObjRemoteWikiGUI, ilObjWikiSettingsGUI, ilObjWorkspaceFolderGUI, ilObjWorkspaceRootFolderGUI, ilObjContactAdministrationGUI, ilObjHelpSettingsGUI, ilObjTermsOfServiceGUI, ilRemoteObjectBaseGUI, ilOrgUnitExtensionGUI, and ilObjectPluginGUI.

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

51 {
52 global $DIC;
53
54 $objDefinition = $DIC["objDefinition"];
55 $tpl = $DIC["tpl"];
56 $ilCtrl = $DIC["ilCtrl"];
57 $ilErr = $DIC["ilErr"];
58 $lng = $DIC["lng"];
59 $ilTabs = $DIC["ilTabs"];
60 $tree = $DIC["tree"];
61 $ilAccess = $DIC["ilAccess"];
62 $this->object_service = $DIC->object();
63 $this->favourites = new ilFavouritesManager();
64
65 if (!isset($ilErr)) {
66 $ilErr = new ilErrorHandling();
67 $ilErr->setErrorHandling(PEAR_ERROR_CALLBACK, array($ilErr,'errorHandler'));
68 } else {
69 $this->ilErr = $ilErr;
70 }
71
72 $this->id_type = $a_id_type;
73 $this->parent_id = $a_parent_node_id;
74 $this->type = $this->getType();
75 $this->html = "";
76
77 $this->tabs_gui = $ilTabs;
78 $this->objDefinition = $objDefinition;
79 $this->tpl = $tpl;
80 $this->ctrl = $ilCtrl;
81 $this->lng = $lng;
82
83 // these are things that are initialised in ilObjectGUI constructor now
84 // and may miss here
85 $this->locator = $DIC["ilLocator"];
86 $this->user = $DIC->user();
87 $this->access = $DIC->access();
88 //$this->settings = $DIC->settings();
89 //$this->rbacreview = $DIC->rbac()->review();
90 $this->toolbar = $DIC->toolbar();
91 $this->request = $DIC->http()->request();
92
93
94 $params = array();
95 switch ($this->id_type) {
97 $this->node_id = $a_id;
98 $this->object_id = ilObject::_lookupObjectId($this->node_id);
99 $this->tree = $tree;
100 $this->access_handler = $ilAccess;
101 $this->call_by_reference = true; // needed for prepareOutput()
102 $params[] = "ref_id";
103 break;
104
106 $this->object_id = $a_id;
107 $this->tree = $tree;
108 $this->access_handler = $ilAccess;
109 $params[] = "obj_id"; // ???
110 break;
111
113 $ilUser = $DIC["ilUser"];
114 $this->node_id = $a_id;
115 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
116 $this->tree = new ilWorkspaceTree($ilUser->getId());
117 $this->object_id = $this->tree->lookupObjectId($this->node_id);
118 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
119 $this->access_handler = new ilWorkspaceAccessHandler($this->tree);
120 $params[] = "wsp_id";
121 break;
122
124 $ilUser = $DIC["ilUser"];
125 $this->object_id = $a_id;
126 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
127 $this->tree = new ilWorkspaceTree($ilUser->getId());
128 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
129 $this->access_handler = new ilWorkspaceAccessHandler($this->tree);
130 $params[] = "obj_id"; // ???
131 break;
132
134 $this->object_id = $a_id;
135 include_once('./Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php');
136 $this->access_handler = new ilPortfolioAccessHandler();
137 $params[] = "prt_id";
138 break;
139
140 case self::OBJECT_ID:
141 $this->object_id = $a_id;
142 include_once "Services/Object/classes/class.ilDummyAccessHandler.php";
143 $this->access_handler = new ilDummyAccessHandler();
144 $params[] = "obj_id";
145 break;
146 }
147 $this->ctrl->saveParameter($this, $params);
148
149
150
151 // old stuff for legacy code (obsolete?)
152 if (!$this->object_id) {
153 $this->creation_mode = true;
154 }
155 if ($this->node_id) {
156 // add parent node id if missing
157 if (!$this->parent_id && $this->tree) {
158 $this->parent_id = $this->tree->getParentId($this->node_id);
159 }
160 }
161 $this->ref_id = $this->node_id;
162 $this->obj_id = $this->object_id;
163
164
165
166 $this->assignObject();
167
168 // set context
169 if (is_object($this->object)) {
170 $this->ctrl->setContext($this->object->getId(), $this->object->getType());
171 }
172
173 $this->afterConstructor();
174 }
user()
Definition: user.php:4
const PEAR_ERROR_CALLBACK
Definition: PEAR.php:35
Manages favourites, currently the interface for other components, needs discussion.
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 $DIC
Definition: goto.php:24
$ilUser
Definition: imgupload.php:18

References $DIC, ilObjectGUI\$ilErr, $ilUser, ilObjectGUI\$lng, $node_id, ilObjectGUI\$objDefinition, $object_id, ilObjectGUI\$tpl, ilObjectGUI\$tree, ilObject\_lookupObjectId(), afterConstructor(), assignObject(), getType(), 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 610 of file class.ilObject2GUI.php.

611 {
612 die("ilObject2GUI::__initTableGUI() is deprecated.");
613 }

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

615 {
616 die("ilObject2GUI::__setTableGUIBasicData() is deprecated.");
617 }

◆ __showButton()

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

Reimplemented from ilObjectGUI.

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

603 {
604 die("ilObject2GUI::__showButton() is deprecated.");
605 }

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

516 {
517 return parent::addAdminLocatorItems($a_do_not_add_object);
518 }

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, ilObjCmiXapiGUI, ilObjContentPageGUI, ilObjDataCollectionGUI, ilObjFileGUI, ilObjItemGroupGUI, ilObjLTIConsumerGUI, ilObjMediaPoolGUI, ilObjPollGUI, ilObjPortfolioBaseGUI, ilObjLinkResourceGUI, and ilObjectPluginGUI.

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

623 {
624 }

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

180 {
181 }

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

219 {
220 if ($this->object_id != 0) {
221 switch ($this->id_type) {
222 case self::OBJECT_ID:
226 $this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
227 break;
228
230 $this->object = ilObjectFactory::getInstanceByRefId($this->node_id);
231 break;
232
234 // to be discussed
235 $this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
236 break;
237 }
238 }
239 }
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(), ilObjAdministrativeNotificationGUI\__construct(), ilObjMainMenuGUI\__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 503 of file class.ilObject2GUI.php.

504 {
505 return parent::buildCloneSelect($existing_objs);
506 }

◆ cancel()

ilObject2GUI::cancel ( )

Reimplemented in ilObjTaxonomyGUI.

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

665 {
666 parent::cancelObject();
667 }

◆ cancelDelete()

ilObject2GUI::cancelDelete ( )
final

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

474 {
475 return parent::cancelDeleteObject();
476 } // 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 453 of file class.ilObject2GUI.php.

454 {
455 return parent::checkPermission($a_perm, $a_cmd, $a_type, $a_ref_id);
456 }

Referenced by ilObjHelpSettingsGUI\activateModule(), ilObjLinkResourceGUI\addLink(), ilObjMediaPoolGUI\allMedia(), ilObjMediaPoolGUI\bulkUpload(), ilObjLinkResourceGUI\confirmDeleteLink(), ilObjHelpSettingsGUI\confirmHelpModulesDeletion(), ilObjMediaPoolGUI\confirmRemove(), ilObjMediaPoolGUI\copyToClipboard(), ilObjMediaPoolGUI\createFolderForm(), ilObjMediaPoolGUI\createMediaFromUploadDir(), ilObjMediaPoolGUI\createMediaPoolPage(), ilObjLinkResourceGUI\deactivateLink(), ilObjHelpSettingsGUI\deactivateModule(), ilObjHelpSettingsGUI\deleteHelpModules(), ilObjLinkResourceGUI\deleteLinks(), ilObjLinkResourceGUI\deleteParameter(), ilObjLinkResourceGUI\deleteParameterForm(), ilObjMediaPoolGUI\editFolder(), ilObjLinkResourceGUI\editLink(), ilObjMediaPoolGUI\editMediaPoolPage(), ilObjBlogGUI\editStyleProperties(), ilObjContentPageGUI\editStyleProperties(), ilObjPortfolioBaseGUI\editStyleProperties(), ilObjMediaPoolGUI\editTitlesAndDescriptions(), ilObjCloudGUI\executeCommand(), ilObjContentPageGUI\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\performBulkUpload(), ilObjMediaPoolGUI\remove(), ilObjLinkResourceGUI\saveAddLink(), ilObjContactAdministrationGUI\saveConfigurationForm(), ilObjMediaPoolGUI\saveFolder(), ilObjItemGroupGUI\saveItemAssignment(), ilObjLinkResourceGUI\saveLinkList(), ilObjMediaPoolGUI\saveMediaPoolPage(), ilObjLinkResourceGUI\saveSettings(), ilObjLinkResourceGUI\saveSorting(), ilObjContentPageGUI\saveStyleSettings(), ilObjMediaPoolGUI\saveTitlesAndDescriptions(), ilObjMediaPoolGUI\selectUploadDirFiles(), ilObjHelpSettingsGUI\setMode(), ilObjLinkResourceGUI\settings(), ilObjLinkResourceGUI\showLinks(), ilObjMediaPoolGUI\showMedia(), ilObjMediaPoolGUI\showMediaPoolPageUsages(), ilObjMediaPoolGUI\showPreview(), ilObjLinkResourceGUI\sort(), ilObjMediaPoolGUI\updateFolder(), ilObjLinkResourceGUI\updateLinks(), ilObjMediaPoolGUI\updateMediaPoolPage(), ilObjContentPageGUI\view(), 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 805 of file class.ilObject2GUI.php.

806 {
807 global $DIC;
808
809 $ilUser = $DIC["ilUser"];
810
811
812 if ($a_perm == "create") {
813 if (!$a_node_id) {
814 $a_node_id = $this->parent_id;
815 }
816 if ($a_node_id) {
817 return $this->getAccessHandler()->checkAccess($a_perm . "_" . $a_type, $a_cmd, $a_node_id);
818 }
819 } else {
820 if (!$a_node_id) {
821 $a_node_id = $this->node_id;
822 }
823 if ($a_node_id) {
824 return $this->getAccessHandler()->checkAccess($a_perm, $a_cmd, $a_node_id);
825 }
826 }
827
828 // if we do not have a node id, check if current user is owner
829 if ($this->obj_id && $this->object->getOwner() == $ilUser->getId()) {
830 return true;
831 }
832 return false;
833 }
getAccessHandler()
Get access handler.

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

Referenced by ilObjLinkResourceGUI\activateTabs(), ilObjWorkspaceFolderGUI\addContentSubTabs(), ilObjBlogGUI\addContributor(), ilObjContentPageGUI\addToNavigationHistory(), ilObjCloudGUI\asyncGetActionListContent(), ilObjPollGUI\confirmDeleteAllVotes(), ilObjBlogGUI\contributors(), ilObjWorkspaceFolderGUI\cut(), ilObjBlogGUI\deactivateAdmin(), ilObjPollGUI\deleteAllVotes(), ilObjWorkspaceFolderGUI\deleteConfirmation(), ilObjPortfolioBaseGUI\deletePortfolioPages(), ilObjPortfolioBaseGUI\determinePageCall(), ilObjFileGUI\edit(), ilObjMediaPoolGUI\edit(), ilObjBibliographicGUI\editObject(), ilObjDataCollectionGUI\editObject(), ilRemoteObjectBaseGUI\editObject(), ilObjHelpSettingsGUI\editSettings(), ilObjBlogGUI\executeCommand(), ilObjCloudGUI\executeCommand(), ilObjContentPageGUI\executeCommand(), ilObjDataCollectionGUI\executeCommand(), ilObjFileGUI\executeCommand(), ilObjWikiSettingsGUI\getAdminTabs(), ilObjContactAdministrationGUI\getAdminTabs(), ilObjHelpSettingsGUI\getAdminTabs(), ilObjPDFGenerationGUI\getAdminTabs(), ilObjContactAdministrationGUI\getConfigurationForm(), ilObjContentPageGUI\getContent(), ilObjCloudGUI\getFile(), ilObjPDFGenerationGUI\hasWritePermission(), ilRemoteObjectBaseGUI\infoScreen(), ilObjBlogGUI\infoScreenForward(), ilObjCloudGUI\infoScreenForward(), ilObjCmiXapiGUI\infoScreenForward(), ilObjContentPageGUI\infoScreenForward(), ilObjDataCollectionGUI\infoScreenForward(), ilObjFileGUI\infoScreenForward(), ilObjLTIConsumerGUI\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(), ilObjContentPageGUI\renderHeaderActions(), ilObjPortfolioBaseGUI\savePortfolioPagesOrdering(), ilObjFileGUI\sendFile(), ilObjHelpSettingsGUI\setMode(), ilObjContentPageGUI\setSettingsSubTabs(), ilObjBlogGUI\setTabs(), ilObjContentPageGUI\setTabs(), ilObjFileGUI\setTabs(), ilObjPollGUI\setTabs(), ilObjPortfolioTemplateGUI\setTabs(), ilObjLinkResourceGUI\setTabs(), setTabs(), ilRemoteObjectBaseGUI\setTabs(), ilObjPortfolioBaseGUI\showEditButton(), ilObjPollGUI\showParticipants(), ilObjPollGUI\showParticipantVotes(), ilObjLinkResourceGUI\showToolbar(), ilRemoteObjectBaseGUI\updateObject(), ilObjHelpSettingsGUI\uploadHelpFile(), 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 499 of file class.ilObject2GUI.php.

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

◆ confirmedDelete()

ilObject2GUI::confirmedDelete ( )

Delete objects (repository/workspace switch)

Reimplemented in ilObjTaxonomyGUI.

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

332 {
333 switch ($this->id_type) {
336 return parent::confirmedDeleteObject();
337
340 return $this->deleteConfirmedObjects();
341
342 case self::OBJECT_ID:
344 // :TODO: should this ever occur?
345 break;
346 }
347 }
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 ilObjCmiXapiVerificationGUI, ilObjCourseVerificationGUI, ilObjExerciseVerificationGUI, ilObjLTIConsumerVerificationGUI, ilObjPortfolioGUI, ilObjSCORMVerificationGUI, and ilObjTestVerificationGUI.

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

649 {
650 parent::createObject();
651 }

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

310 {
311 switch ($this->id_type) {
314 return parent::deleteObject();
315
318 return $this->deleteConfirmation();
319
320 case self::OBJECT_ID:
322 // :TODO: should this ever occur?
323 break;
324 }
325 }

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

◆ deleteConfirmedObjects()

ilObject2GUI::deleteConfirmedObjects ( )
protected

Delete objects (workspace specific)

This should probably be moved elsewhere as done with RepUtil

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

355 {
356 global $DIC;
357
358 $lng = $DIC["lng"];
359
360
361 if (sizeof($_POST["id"])) {
362 // #18797 - because of parent/child relations gather all nodes first
363 $del_nodes = array();
364 foreach ($_POST["id"] as $node_id) {
365 $del_nodes[$node_id] = $this->tree->getNodeData($node_id);
366 }
367
368 foreach ($del_nodes as $node_id => $node) {
369 // tree/reference
370 $this->tree->deleteReference($node_id);
371 if ($this->tree->isInTree($node_id)) {
372 $this->tree->deleteTree($node);
373 }
374
375 // permission
376 $this->getAccessHandler()->removePermission($node_id);
377
378 // object
379 $object = ilObjectFactory::getInstanceByObjId($node["obj_id"], false);
380 if ($object) {
381 $object->delete();
382 }
383 }
384
385 ilUtil::sendSuccess($lng->txt("msg_removed"), true);
386 } else {
387 ilUtil::sendFailure($lng->txt("no_checkbox"), true);
388 }
389
390 $this->ctrl->redirect($this, "");
391 }
$_POST["username"]
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

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

Referenced by confirmedDelete().

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

◆ displayList()

ilObject2GUI::displayList ( )
private

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

510 {
511 return parent::displayList();
512 }

◆ edit()

ilObject2GUI::edit ( )

Reimplemented in ilObjFileGUI, ilObjMediaPoolGUI, and ilObjWorkspaceFolderGUI.

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

657 {
658 parent::editObject();
659 }

◆ executeCommand()

ilObject2GUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

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

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

187 {
188 $next_class = $this->ctrl->getNextClass($this);
189 $cmd = $this->ctrl->getCmd();
190
191 $this->prepareOutput();
192
193 switch ($next_class) {
194 case "ilworkspaceaccessgui":
195 if ($this->node_id) {
196 $this->tabs_gui->activateTab("id_permissions");
197
198 include_once('./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessGUI.php');
199 $wspacc = new ilWorkspaceAccessGUI($this->node_id, $this->getAccessHandler());
200 $this->ctrl->forwardCommand($wspacc);
201 break;
202 }
203
204 // no break
205 default:
206 if (!$cmd) {
207 $cmd = "render";
208 }
209 return $this->$cmd();
210 }
211
212 return true;
213 }
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 491 of file class.ilObject2GUI.php.

492 {
493 return parent::fillCloneSearchTemplate($a_tpl_varname, $a_type);
494 }

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

488 {
489 return parent::fillCloneTemplate($a_tpl_varname, $a_type);
490 }

Referenced by ilObjFileGUI\initCreationForms(), ilObjLTIConsumerGUI\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 441 of file class.ilObject2GUI.php.

442 {
443 return parent::getCenterColumnHTML();
444 }

◆ getCreationMode()

◆ getHTML()

ilObject2GUI::getHTML ( )

Reimplemented from ilObjectGUI.

Reimplemented in ilObjBlogGUI, and ilObjPollGUI.

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

394 {
395 return parent::getHTML();
396 }

◆ getPermanentLinkWidget()

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

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

894 {
895 if ($this->id_type == self::WORKSPACE_NODE_ID) {
896 $a_append .= "_wsp";
897 }
898
899 include_once('Services/PermanentLink/classes/class.ilPermanentLinkGUI.php');
900 $plink = new ilPermanentLinkGUI($this->getType(), $this->node_id, $a_append);
901 $plink->setIncludePermanentLinkText(false);
902 $plink->setAlignCenter($a_center);
903 return $plink->getHTML();
904 }
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 586 of file class.ilObject2GUI.php.

587 {
588 die("ilObject2GUI::getReturnLocation() is deprecated.");
589 }

◆ getRightColumnHTML()

ilObject2GUI::getRightColumnHTML ( )
finalprotected

Display right column.

Reimplemented from ilObjectGUI.

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

446 {
447 return parent::getRightColumnHTML();
448 }

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

599 {
600 die("ilObject2GUI::getTabs() is deprecated.");
601 }

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

430 {
431 return parent::getTargetFrame($a_cmd, $a_target_frame);
432 }

Referenced by ilObjFileGUI\initMultiUploadForm().

+ Here is the caller graph for this function:

◆ getType()

ilObject2GUI::getType ( )
abstract

Functions that must be overwritten.

Reimplemented in ilObjBibliographicGUI, ilObjBlogGUI, ilObjCloudGUI, ilObjCmiXapiGUI, ilObjCmiXapiVerificationGUI, ilObjContentPageGUI, ilObjCourseVerificationGUI, ilObjDataCollectionGUI, ilObjExerciseVerificationGUI, ilObjFileGUI, ilObjItemGroupGUI, ilObjLTIConsumerGUI, ilObjLTIConsumerVerificationGUI, ilObjMediaPoolGUI, ilObjPollGUI, ilObjPortfolioGUI, ilObjPortfolioTemplateGUI, ilObjRemoteCategoryGUI, ilObjRemoteCourseGUI, ilObjRemoteFileGUI, ilObjRemoteGlossaryGUI, ilObjRemoteGroupGUI, ilObjRemoteLearningModuleGUI, ilObjRemoteTestGUI, ilObjRemoteWikiGUI, ilObjSCORMVerificationGUI, ilObjTestVerificationGUI, ilObjLinkResourceGUI, ilObjWikiSettingsGUI, ilObjWorkspaceFolderGUI, ilObjWorkspaceRootFolderGUI, ilObjAdministrativeNotificationGUI, ilObjContactAdministrationGUI, ilObjHelpSettingsGUI, ilObjMainMenuGUI, ilObjPDFGenerationGUI, ilObjTaxonomyGUI, ilObjTermsOfServiceGUI, and ilObjWorkflowEngineGUI.

Referenced by __construct(), ilRemoteObjectBaseGUI\callObject(), ilObjectPluginGUI\executeCommand(), ilObjectPluginGUI\getCreationFormTitle(), getPermanentLinkWidget(), ilOrgUnitExtensionGUI\getPlugin(), ilObjectPluginGUI\getPlugin(), ilRemoteObjectBaseGUI\infoScreen(), ilRemoteObjectBaseGUI\initEditForm(), initHeaderAction(), ilObjPortfolioBaseGUI\preview(), ilObjPortfolioBaseGUI\setSettingsSubTabs(), ilObjPortfolioBaseGUI\showEditButton(), ilRemoteObjectBaseGUI\updateObject(), and ilObjPortfolioBaseGUI\view().

+ Here is the caller graph for this function:

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

775 {
776 global $DIC;
777
778 $objDefinition = $DIC["objDefinition"];
779
780
781 $a_callback_ref_id = (int) $a_callback_ref_id;
782 if ($a_callback_ref_id) {
783 $callback_type = ilObject::_lookupType($a_callback_ref_id, true);
784 $class_name = "ilObj" . $objDefinition->getClassName($callback_type) . "GUI";
785 $location = $objDefinition->getLocation($callback_type);
786 include_once($location . "/class." . $class_name . ".php");
787 if (in_array(strtolower($class_name), array("ilobjitemgroupgui"))) {
788 $callback_obj = new $class_name($a_callback_ref_id);
789 } else {
790 $callback_obj = new $class_name(null, $a_callback_ref_id, true, false);
791 }
792 $callback_obj->afterSaveCallback($a_obj);
793 }
794 }
$location
Definition: buildRTE.php:44
static _lookupType($a_id, $a_reference=false)
lookup object type

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

Referenced by putObjectInTree().

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

911 {
912 // only needed in repository
913 if ($this->id_type == self::REPOSITORY_NODE_ID) {
914 parent::handleAutoRating($a_new_obj);
915 }
916 }

Referenced by ilObjLTIConsumerGUI\saveCustom().

+ Here is the caller graph for this function:

◆ hitsperpageObject()

ilObject2GUI::hitsperpageObject ( )
finalprotected

Reimplemented from ilObjectGUI.

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

607 {
608 die("ilObject2GUI::hitsperpageObject() is deprecated.");
609 }

◆ importFile()

ilObject2GUI::importFile ( )

Import.

@access public

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

695 {
696 parent::importFileObject($this->parent_id);
697 }

◆ 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, ilObjLTIConsumerGUI, ilObjMediaPoolGUI, ilObjPortfolioGUI, ilObjWorkspaceFolderGUI, ilObjectPluginGUI, and ilObjTaxonomyGUI.

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

678 {
679 $forms = parent::initCreationForms($a_new_type);
680
681 // cloning doesn't work in workspace yet
682 if ($this->id_type == self::WORKSPACE_NODE_ID) {
683 unset($forms[self::CFORM_CLONE]);
684 }
685
686 return $forms;
687 }

◆ 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 ilObjCmiXapiGUI, ilObjFileGUI, and ilObjLTIConsumerGUI.

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

843 {
844 if ($this->id_type == self::WORKSPACE_NODE_ID) {
845 if (!$this->creation_mode && $this->object_id) {
846 include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
847 $dispatcher = new ilCommonActionDispatcherGUI(
849 $this->getAccessHandler(),
850 $this->getType(),
851 $this->node_id,
852 $this->object_id
853 );
854
855 $dispatcher->setSubObject($a_sub_type, $a_sub_id);
856
857 include_once "Services/Object/classes/class.ilObjectListGUI.php";
858 ilObjectListGUI::prepareJSLinks(
859 $this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
860 $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false),
861 $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false)
862 );
863
864 $lg = $dispatcher->initHeaderAction();
865
866 if (is_object($lg)) {
867 // to enable add to desktop / remove from desktop
868 if ($this instanceof ilDesktopItemHandling) {
869 $lg->setContainerObject($this);
870 }
871
872 // for activation checks see ilObjectGUI
873 // $lg->enableComments(true);
874 $lg->enableNotes(true);
875 // $lg->enableTags(true);
876 }
877
878 return $lg;
879 }
880 } else {
881 return parent::initHeaderAction($a_sub_type, $a_sub_id);
882 }
883 }
Class ilCommonActionDispatcherGUI.
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.

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

438 {
439 return parent::isVisible($a_ref_id, $a_type);
440 }

◆ omitLocator()

ilObject2GUI::omitLocator (   $a_omit = true)
finalprotected

Reimplemented from ilObjectGUI.

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

426 {
427 return parent::omitLocator($a_omit);
428 }

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

706 {
707 global $DIC;
708
709 $rbacreview = $DIC["rbacreview"];
710 $ilUser = $DIC["ilUser"];
711
712
713 $this->object_id = $a_obj->getId();
714
715 if (!$a_parent_node_id) {
716 $a_parent_node_id = $this->parent_id;
717 }
718
719 // add new object to custom parent container
720 if ((int) $_REQUEST["crtptrefid"]) {
721 $a_parent_node_id = (int) $_REQUEST["crtptrefid"];
722 }
723
724 switch ($this->id_type) {
727 if (!$this->node_id) {
728 $a_obj->createReference();
729 $this->node_id = $a_obj->getRefId();
730 }
731 $a_obj->putInTree($a_parent_node_id);
732 $a_obj->setPermissions($a_parent_node_id);
733
734 // rbac log
735 include_once "Services/AccessControl/classes/class.ilRbacLog.php";
736 $rbac_log_roles = $rbacreview->getParentRoleIds($this->node_id, false);
737 $rbac_log = ilRbacLog::gatherFaPa($this->node_id, array_keys($rbac_log_roles), true);
738 ilRbacLog::add(ilRbacLog::CREATE_OBJECT, $this->node_id, $rbac_log);
739
740 $this->ctrl->setParameter($this, "ref_id", $this->node_id);
741 break;
742
745 if (!$this->node_id) {
746 $this->node_id = $this->tree->insertObject($a_parent_node_id, $this->object_id);
747 }
748 $this->getAccessHandler()->setPermissions($a_parent_node_id, $this->node_id);
749
750 $this->ctrl->setParameter($this, "wsp_id", $this->node_id);
751 break;
752
753 case self::OBJECT_ID:
755 // do nothing
756 break;
757 }
758
759 // BEGIN ChangeEvent: Record save object.
760 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
761 ilChangeEvent::_recordWriteEvent($this->object_id, $ilUser->getId(), 'create');
762 // END ChangeEvent: Record save object.
763
764 // use forced callback after object creation
765 self::handleAfterSaveCallback($a_obj, $_REQUEST["crtcb"]);
766 }
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 ilObjLTIConsumerGUI\createNewObject(), ilObjCmiXapiVerificationGUI\save(), ilObjCourseVerificationGUI\save(), ilObjExerciseVerificationGUI\save(), ilObjLTIConsumerVerificationGUI\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 481 of file class.ilObject2GUI.php.

482 {
483 return parent::redirectToRefId();
484 } // ok

◆ redrawHeaderAction()

ilObject2GUI::redrawHeaderAction ( )
protected

Updating icons after ajax call.

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

889 {
890 parent::redrawHeaderActionObject();
891 }

◆ removeFromSystem()

ilObject2GUI::removeFromSystem ( )
final

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

478 {
479 return parent::removeFromSystemObject();
480 } // done

◆ save()

◆ searchCloneSource()

ilObject2GUI::searchCloneSource ( )
finalprotected

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

496 {
497 return parent::searchCloneSourceObject();
498 }

◆ setColumnSettings()

ilObject2GUI::setColumnSettings ( ilColumnGUI  $column_gui)
finalprotected

May be overwritten in subclasses.

Reimplemented from ilObjectGUI.

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

450 {
451 return parent::setColumnSettings($column_gui);
452 }

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

406 {
407 return parent::setCreationMode($a_mode);
408 }

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

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

591 {
592 die("ilObject2GUI::setReturnLocation() is deprecated.");
593 }

◆ 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, ilObjCmiXapiGUI, ilObjContentPageGUI, ilObjDataCollectionGUI, ilObjFileGUI, ilObjItemGroupGUI, ilObjLTIConsumerGUI, ilObjMediaPoolGUI, ilObjPollGUI, ilObjPortfolioGUI, ilObjPortfolioTemplateGUI, ilObjLinkResourceGUI, and ilRemoteObjectBaseGUI.

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

547 {
548 global $DIC;
549
550 $ilTabs = $DIC["ilTabs"];
551 $lng = $DIC["lng"];
552
553
554 switch ($this->id_type) {
557 if ($this->checkPermissionBool("edit_permission")) {
558 $ilTabs->addTab(
559 "id_permissions",
560 $lng->txt("perm_settings"),
561 $this->ctrl->getLinkTargetByClass(array(get_class($this), "ilpermissiongui"), "perm")
562 );
563 }
564 break;
565
568 // only files and blogs can be shared for now
569 if ($this->checkPermissionBool("edit_permission") && in_array($this->type, array("file", "blog")) && $this->node_id) {
570 $ilTabs->addTab(
571 "id_permissions",
572 $lng->txt("wsp_permissions"),
573 $this->ctrl->getLinkTargetByClass(array(get_class($this), "ilworkspaceaccessgui"), "share")
574 );
575 }
576 break;
577 }
578 }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.

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

434 {
435 return parent::setTargetFrame($a_cmd, $a_target_frame);
436 }

◆ setTitleAndDescription()

ilObject2GUI::setTitleAndDescription ( )
protected

called by prepare output

Reimplemented from ilObjectGUI.

Reimplemented in ilObjContentPageGUI, ilObjPortfolioGUI, and ilObjWorkspaceRootFolderGUI.

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

418 {
419 return parent::setTitleAndDescription();
420 }

◆ showActions()

ilObject2GUI::showActions ( )
finalprotected

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

595 {
596 die("ilObject2GUI::showActions() is deprecated.");
597 }

◆ showPossibleSubObjects()

ilObject2GUI::showPossibleSubObjects ( )
finalprotected

show possible subobjects (pulldown menu)

@access public

Reimplemented from ilObjectGUI.

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

460 {
461 return parent::showPossibleSubObjects();
462 }

◆ showUpperIcon()

ilObject2GUI::showUpperIcon ( )
finalprotected

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

422 {
423 return parent::showUpperIcon();
424 }

◆ trash()

ilObject2GUI::trash ( )
final

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

465 {
466 return parent::trashObject();
467 } // done

◆ undelete()

ilObject2GUI::undelete ( )
final

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

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

◆ update()

ilObject2GUI::update ( )

Reimplemented in ilObjFileGUI, and ilObjWorkspaceFolderGUI.

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

661 {
662 parent::updateObject();
663 }

◆ view()

ilObject2GUI::view ( )

view object content (repository/workspace switch)

Reimplemented in ilObjBibliographicGUI, ilObjContentPageGUI, ilObjPortfolioBaseGUI, and ilObjLinkResourceGUI.

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

524 {
525 switch ($this->id_type) {
528 return parent::viewObject();
529
532 return $this->render();
533
534 case self::OBJECT_ID:
536 // :TODO: should this ever occur? do nothing or edit() ?!
537 break;
538 }
539 }

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

402 {
403 return parent::withReferences();
404 }

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

◆ 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: