ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilRemoteObjectBaseGUI Class Reference
+ Inheritance diagram for ilRemoteObjectBaseGUI:
+ Collaboration diagram for ilRemoteObjectBaseGUI:

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...
 
 showObject ()
 show remote object More...
 
 setTabs ()
 get tabs More...
 
 callObject ()
 call remote object More...
 
 infoScreenObject ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed More...
 
 infoScreen ()
 show info screen More...
 
 editObject (ilPropertyFormGUI $a_form=null)
 Edit settings. More...
 
 updateObject ()
 update object More...
 
- Public Member Functions inherited from ilObject2GUI
 __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...
 

Static Public Member Functions

static _goto ($a_target)
 redirect script More...
 
- Static Public Member Functions inherited from ilObject2GUI
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...
 

Protected Member Functions

 addCustomInfoFields (ilInfoScreenGUI $a_info)
 Add custom fields to info screen. More...
 
 initEditForm ()
 Init edit settings form. More...
 
 addCustomEditForm (ilPropertyFormGUI $a_form)
 Add custom fields to edit form. More...
 
 updateCustomValues (ilPropertyFormGUI $a_form)
 Update object custom values. More...
 
- Protected Member Functions inherited from ilObject2GUI
 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...
 

Additional Inherited Members

- Data Fields inherited from ilObject2GUI
 $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 Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 

Detailed Description

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 13 of file class.ilRemoteObjectBaseGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilRemoteObjectBaseGUI::__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 from ilObject2GUI.

Reimplemented in ilObjRemoteCategoryGUI, ilObjRemoteCourseGUI, ilObjRemoteFileGUI, ilObjRemoteGlossaryGUI, ilObjRemoteGroupGUI, ilObjRemoteLearningModuleGUI, ilObjRemoteTestGUI, and ilObjRemoteWikiGUI.

Definition at line 15 of file class.ilRemoteObjectBaseGUI.php.

16 {
17 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
18
19 $this->lng->loadLanguageModule('ecs');
20 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilRemoteObjectBaseGUI::_goto (   $a_target)
static

redirect script

Parameters
string$a_target

Definition at line 353 of file class.ilRemoteObjectBaseGUI.php.

354 {
355 global $DIC;
356
357 $ilErr = $DIC['ilErr'];
358 $lng = $DIC['lng'];
359 $ilAccess = $DIC['ilAccess'];
360
361 //static if ($this->checkPermissionBool("visible", "", "", $a_target))
362 if ($ilAccess->checkAccess('visible', '', $a_target)) {
363 $_GET["cmd"] = "infoScreen";
364 $_GET["ref_id"] = $a_target;
365 $_GET["baseClass"] = "ilRepositoryGUI";
366 include("ilias.php");
367 exit;
368 }
369 //static else if ($this->checkPermissionBool("read", "", "", ROOT_FOLDER_ID))
370 if ($ilAccess->checkAccess('read', '', ROOT_FOLDER_ID)) {
371 $_GET["cmd"] = "frameset";
372 $_GET["target"] = "";
373 $_GET["ref_id"] = ROOT_FOLDER_ID;
374 ilUtil::sendFailure(sprintf(
375 $lng->txt("msg_no_perm_read_item"),
377 ), true);
378 $_GET["baseClass"] = "ilRepositoryGUI";
379 include("ilias.php");
380 exit;
381 }
382
383 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
384 }
$_GET["client_id"]
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
exit
Definition: login.php:29
$DIC
Definition: xapitoken.php:46

References $_GET, $DIC, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ addCustomEditForm()

ilRemoteObjectBaseGUI::addCustomEditForm ( ilPropertyFormGUI  $a_form)
protected

Add custom fields to edit form.

Parameters
ilPropertyFormGUI$a_form

Reimplemented in ilObjRemoteCourseGUI, ilObjRemoteGlossaryGUI, ilObjRemoteGroupGUI, ilObjRemoteLearningModuleGUI, ilObjRemoteTestGUI, and ilObjRemoteWikiGUI.

Definition at line 296 of file class.ilRemoteObjectBaseGUI.php.

297 {
298 }

Referenced by initEditForm().

+ Here is the caller graph for this function:

◆ addCustomInfoFields()

ilRemoteObjectBaseGUI::addCustomInfoFields ( ilInfoScreenGUI  $a_info)
protected

Add custom fields to info screen.

Parameters
ilInfoScreenGUI$a_info

Reimplemented in ilObjRemoteCourseGUI, ilObjRemoteFileGUI, ilObjRemoteGlossaryGUI, ilObjRemoteGroupGUI, ilObjRemoteLearningModuleGUI, ilObjRemoteTestGUI, and ilObjRemoteWikiGUI.

Definition at line 215 of file class.ilRemoteObjectBaseGUI.php.

216 {
217 }

Referenced by infoScreen().

+ Here is the caller graph for this function:

◆ callObject()

ilRemoteObjectBaseGUI::callObject ( )

call remote object

Returns
bool

Definition at line 114 of file class.ilRemoteObjectBaseGUI.php.

115 {
116 include_once './Services/Tracking/classes/class.ilChangeEvent.php';
118 $this->getType(),
119 $this->object->getRefId(),
120 $this->object->getId(),
121 $GLOBALS['DIC']['ilUser']->getId()
122 );
123
124
125 // check if the assigned object is hosted on the same installation
126 $link = $this->object->getFullRemoteLink();
127 if ($link) {
128 ilUtil::redirect($link);
129 return true;
130 } else {
131 ilUtil::sendFailure('Cannot call remote object.');
132 $this->infoScreenObject();
133 return false;
134 }
135 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
static _recordReadEvent( $a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
getType()
Functions that must be overwritten.
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
static redirect($a_script)

References $GLOBALS, ilChangeEvent\_recordReadEvent(), ilObject2GUI\getType(), infoScreenObject(), ilUtil\redirect(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ editObject()

ilRemoteObjectBaseGUI::editObject ( ilPropertyFormGUI  $a_form = null)

Edit settings.

Parameters
ilPropertyFormGUI$a_form

Definition at line 224 of file class.ilRemoteObjectBaseGUI.php.

225 {
226 global $DIC;
227
228 $ilErr = $DIC['ilErr'];
229 $ilTabs = $DIC['ilTabs'];
230
231 if (!$this->checkPermissionBool('write')) {
232 $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->MESSAGE);
233 }
234
235 $ilTabs->activateTab('edit');
236
237 if (!$a_form) {
238 $a_form = $this->initEditForm();
239 }
240 $this->tpl->setContent($a_form->getHTML());
241 }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
initEditForm()
Init edit settings form.

References $DIC, ilObjectGUI\$ilErr, ilObject2GUI\checkPermissionBool(), and initEditForm().

+ Here is the call graph for this function:

◆ executeCommand()

ilRemoteObjectBaseGUI::executeCommand ( )

execute command

Reimplemented from ilObject2GUI.

Definition at line 22 of file class.ilRemoteObjectBaseGUI.php.

23 {
24 global $DIC;
25
26 $ilTabs = $DIC['ilTabs'];
27
28 $next_class = $this->ctrl->getNextClass($this);
29 $cmd = $this->ctrl->getCmd();
30
31 $this->prepareOutput();
32
33 switch ($next_class) {
34 case 'ilinfoscreengui':
35 // forwards command
36 $this->infoScreen();
37 break;
38
39 case 'ilpermissiongui':
40 $ilTabs->activateTab('id_permissions');
41 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
42 $this->ctrl->forwardCommand(new ilPermissionGUI($this));
43 break;
44
45 case "ilcommonactiondispatchergui":
46 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
48 $this->ctrl->forwardCommand($gui);
49 break;
50
51 default:
52 if (!$cmd || $cmd == 'view') {
53 $cmd = "editSettings";
54 }
55 $cmd .= "Object";
56 $this->$cmd();
57 break;
58 }
59 return true;
60 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.

References $DIC, ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), infoScreen(), and ilObject2GUI\prepareOutput().

+ Here is the call graph for this function:

◆ infoScreen()

ilRemoteObjectBaseGUI::infoScreen ( )

show info screen

Definition at line 152 of file class.ilRemoteObjectBaseGUI.php.

153 {
154 global $DIC;
155
156 $ilErr = $DIC['ilErr'];
157 $ilUser = $DIC['ilUser'];
158 $ilTabs = $DIC['ilTabs'];
159
160 if (!$this->checkPermissionBool('visible')) {
161 $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->MESSAGE);
162 }
163
164 $ilTabs->activateTab('info');
165
166 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
167 $info = new ilInfoScreenGUI($this);
168
169 if ($ilUser->getId() == ANONYMOUS_USER_ID ||
170 $this->object->isLocalObject()) {
171 $info->addButton(
172 $this->lng->txt($this->getType() . '_call'),
173 $this->object->getRemoteLink(),
174 'target="_blank"'
175 );
176 } else {
177 $info->addButton(
178 $this->lng->txt($this->getType() . '_call'),
179 $this->ctrl->getLinkTarget($this, 'call'),
180 'target="_blank"'
181 );
182 }
183
184 $info->addSection($this->lng->txt('ecs_general_info'));
185 $info->addProperty($this->lng->txt('title'), $this->object->getTitle());
186 if (strlen($this->object->getOrganization())) {
187 $info->addProperty($this->lng->txt('organization'), $this->object->getOrganization());
188 }
189 if (strlen($this->object->getDescription())) {
190 $info->addProperty($this->lng->txt('description'), $this->object->getDescription());
191 }
192 if (strlen($loc = $this->object->getLocalInformation())) {
193 $info->addProperty($this->lng->txt('ecs_local_information'), $this->object->getLocalInformation());
194 }
195
196 $this->addCustomInfoFields($info);
197
198 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
199 $record_gui = new ilAdvancedMDRecordGUI(
201 $this->getType(),
202 $this->object->getId()
203 );
204 $record_gui->setInfoObject($info);
205 $record_gui->parse();
206
207 $this->ctrl->forwardCommand($info);
208 }
Class ilInfoScreenGUI.
addCustomInfoFields(ilInfoScreenGUI $a_info)
Add custom fields to info screen.
$ilUser
Definition: imgupload.php:18

References $DIC, ilObjectGUI\$ilErr, $ilUser, addCustomInfoFields(), ilObject2GUI\checkPermissionBool(), ilObject2GUI\getType(), and ilAdvancedMDRecordGUI\MODE_INFO.

Referenced by executeCommand(), and infoScreenObject().

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

◆ infoScreenObject()

ilRemoteObjectBaseGUI::infoScreenObject ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

Definition at line 142 of file class.ilRemoteObjectBaseGUI.php.

143 {
144 $this->ctrl->setCmd("showSummary");
145 $this->ctrl->setCmdClass("ilinfoscreengui");
146 $this->infoScreen();
147 }

References infoScreen().

Referenced by callObject().

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

◆ initEditForm()

ilRemoteObjectBaseGUI::initEditForm ( )
protected

Init edit settings form.

Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

Definition at line 248 of file class.ilRemoteObjectBaseGUI.php.

249 {
250 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
251 $form = new ilPropertyFormGUI();
252 $form->setFormAction($this->ctrl->getFormAction($this));
253 $form->setTitle($this->lng->txt('ecs_general_info'));
254 $form->addCommandButton('update', $this->lng->txt('save'));
255 $form->addCommandButton('edit', $this->lng->txt('cancel'));
256
257 $text = new ilTextInputGUI($this->lng->txt('title'), 'title');
258 $text->setValue($this->object->getTitle());
259 $text->setSize(min(40, ilObject::TITLE_LENGTH));
260 $text->setMaxLength(ilObject::TITLE_LENGTH);
261 $text->setDisabled(true);
262 $form->addItem($text);
263
264 $area = new ilTextAreaInputGUI($this->lng->txt('description'), 'description');
265 $area->setValue($this->object->getDescription());
266 $area->setRows(3);
267 $area->setCols(80);
268 $area->setDisabled(true);
269 $form->addItem($area);
270
271 $area = new ilTextAreaInputGUI($this->lng->txt('ecs_local_information'), 'local_info');
272 $area->setValue($this->object->getLocalInformation());
273 $area->setRows(3);
274 $area->setCols(80);
275 $form->addItem($area);
276
277 $this->addCustomEditForm($form);
278
279 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
280 $record_gui = new ilAdvancedMDRecordGUI(
282 $this->getType(),
283 $this->object->getId()
284 );
285 $record_gui->setPropertyForm($form);
286 $record_gui->parse();
287
288 return $form;
289 }
const TITLE_LENGTH
max length of object title
This class represents a property form user interface.
addCustomEditForm(ilPropertyFormGUI $a_form)
Add custom fields to edit form.
This class represents a text area property in a property form.
This class represents a text property in a property form.

References addCustomEditForm(), ilObject2GUI\getType(), ilAdvancedMDRecordGUI\MODE_EDITOR, and ilObject\TITLE_LENGTH.

Referenced by editObject(), and updateObject().

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

◆ setTabs()

ilRemoteObjectBaseGUI::setTabs ( )

get tabs

Reimplemented from ilObject2GUI.

Definition at line 83 of file class.ilRemoteObjectBaseGUI.php.

84 {
85 global $DIC;
86
87 $ilTabs = $DIC['ilTabs'];
88
89 if ($this->checkPermissionBool('visible')) {
90 $ilTabs->addTab(
91 "info",
92 $this->lng->txt("info_short"),
93 $this->ctrl->getLinkTarget($this, "infoScreen")
94 );
95 }
96
97 if ($this->checkPermissionBool('write')) {
98 $ilTabs->addTab(
99 "edit",
100 $this->lng->txt("edit"),
101 $this->ctrl->getLinkTarget($this, "edit")
102 );
103 }
104
105 // will add permissions if needed
106 parent::setTabs();
107 }

References $DIC, and ilObject2GUI\checkPermissionBool().

+ Here is the call graph for this function:

◆ showObject()

ilRemoteObjectBaseGUI::showObject ( )

show remote object

Definition at line 65 of file class.ilRemoteObjectBaseGUI.php.

66 {
67 global $DIC;
68
69 $ilUser = $DIC['ilUser'];
70
71 if ($ilUser->getId() == ANONYMOUS_USER_ID ||
72 $this->object->isLocalObject()) {
73 ilUtil::redirect($this->object->getRemoteLink());
74 } else {
75 $link = $this->object->getFullRemoteLink();
76 ilUtil::redirect($link);
77 }
78 }

References $DIC, $ilUser, and ilUtil\redirect().

+ Here is the call graph for this function:

◆ updateCustomValues()

ilRemoteObjectBaseGUI::updateCustomValues ( ilPropertyFormGUI  $a_form)
protected

Update object custom values.

Parameters
ilPropertyFormGUI$a_form

Definition at line 344 of file class.ilRemoteObjectBaseGUI.php.

345 {
346 }

Referenced by updateObject().

+ Here is the caller graph for this function:

◆ updateObject()

ilRemoteObjectBaseGUI::updateObject ( )

update object

Reimplemented from ilObjectGUI.

Definition at line 303 of file class.ilRemoteObjectBaseGUI.php.

304 {
305 global $DIC;
306
307 $ilErr = $DIC['ilErr'];
308
309 if (!$this->checkPermissionBool('write')) {
310 $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->MESSAGE);
311 }
312
313 $form = $this->initEditForm();
314 if ($form->checkInput()) {
315 $this->object->setLocalInformation($a_form->getInput('local_info'));
316
317 $this->updateCustomValues($form);
318
319 $this->object->update();
320
321 // Save advanced meta data
322 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
323 $record_gui = new ilAdvancedMDRecordGUI(
325 $this->getType(),
326 $this->object->getId()
327 );
328 $record_gui->loadFromPost();
329 $record_gui->saveValues();
330
331 ilUtil::sendSuccess($this->lng->txt("settings_saved"));
332 $this->editObject();
333 }
334
335 $form->setValuesByPost();
336 $this->editObject($form);
337 }
editObject()
edit object
updateCustomValues(ilPropertyFormGUI $a_form)
Update object custom values.

References $DIC, ilObjectGUI\$ilErr, ilObject2GUI\checkPermissionBool(), ilObjectGUI\editObject(), ilObject2GUI\getType(), initEditForm(), ilAdvancedMDRecordGUI\MODE_EDITOR, and updateCustomValues().

+ Here is the call graph for this function:

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