ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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...
 
 isVisible ()
 
 trash ()
 
 undelete ()
 
 cancelDelete ()
 
 removeFromSystem ()
 
 cloneAll ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 Deleted in ilObject. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 Import. More...
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ($in_rep=false)
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 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 _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...
 
 deleteConfirmation ()
 Display delete confirmation form (workspace specific) More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) More...
 
 prepareOutput ()
 prepare output 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 ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="")
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 redirectToRefId ()
 
 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 ()
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ()
 Deprecated functions. More...
 
 setReturnLocation ()
 
 showActions ()
 
 getTitlesByRefId ()
 
 getTabs ()
 
 __showButton ()
 
 hitsperpageObject ()
 
 __initTableGUI ()
 
 __setTableGUIBasicData ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @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...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

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
 
 $ilias
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 

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 }

Member Function Documentation

◆ _goto()

static ilRemoteObjectBaseGUI::_goto (   $a_target)
static

redirect script

Parameters
string$a_target

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

344 {
345 global $ilErr, $lng, $ilAccess;
346
347 //static if ($this->checkPermissionBool("visible", "", "", $a_target))
348 if($ilAccess->checkAccess('visible','',$a_target))
349 {
350 $_GET["cmd"] = "infoScreen";
351 $_GET["ref_id"] = $a_target;
352 $_GET["baseClass"] = "ilRepositoryGUI";
353 include("ilias.php");
354 exit;
355 }
356 //static else if ($this->checkPermissionBool("read", "", "", ROOT_FOLDER_ID))
357 if($ilAccess->checkAccess('read','',ROOT_FOLDER_ID))
358 {
359 $_GET["cmd"] = "frameset";
360 $_GET["target"] = "";
361 $_GET["ref_id"] = ROOT_FOLDER_ID;
362 ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
364 $_GET["baseClass"] = "ilRepositoryGUI";
365 include("ilias.php");
366 exit;
367 }
368
369 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
370 }
$_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:54

References $_GET, $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 287 of file class.ilRemoteObjectBaseGUI.php.

288 {
289
290 }

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 209 of file class.ilRemoteObjectBaseGUI.php.

210 {
211
212 }

Referenced by infoScreen().

+ Here is the caller graph for this function:

◆ callObject()

ilRemoteObjectBaseGUI::callObject ( )

call remote object

Returns
bool

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

110 {
111 include_once './Services/Tracking/classes/class.ilChangeEvent.php';
113 $this->getType(),
114 $this->object->getRefId(),
115 $this->object->getId(),
116 $GLOBALS['ilUser']->getId()
117 );
118
119
120 // check if the assigned object is hosted on the same installation
121 $link = $this->object->getFullRemoteLink();
122 if($link)
123 {
124 ilUtil::redirect($link);
125 return true;
126 }
127 else
128 {
129 ilUtil::sendFailure('Cannot call remote object.');
130 $this->infoScreenObject();
131 return false;
132 }
133 }
_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)
http redirect to other script
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276

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 219 of file class.ilRemoteObjectBaseGUI.php.

220 {
221 global $ilErr,$ilTabs;
222
223 if(!$this->checkPermissionBool('write'))
224 {
225 $ilErr->raiseError($this->lng->txt('msg_no_perm_read'),$ilErr->MESSAGE);
226 }
227
228 $ilTabs->activateTab('edit');
229
230 if(!$a_form)
231 {
232 $a_form = $this->initEditForm();
233 }
234 $this->tpl->setContent($a_form->getHTML());
235 }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
initEditForm()
Init edit settings form.

References $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 $ilTabs;
25
26 $next_class = $this->ctrl->getNextClass($this);
27 $cmd = $this->ctrl->getCmd();
28
29 $this->prepareOutput();
30
31 switch($next_class)
32 {
33 case 'ilinfoscreengui':
34 // forwards command
35 $this->infoScreen();
36 break;
37
38 case 'ilpermissiongui':
39 $ilTabs->activateTab('id_permissions');
40 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
41 $this->ctrl->forwardCommand(new ilPermissionGUI($this));
42 break;
43
44 case "ilcommonactiondispatchergui":
45 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
47 $this->ctrl->forwardCommand($gui);
48 break;
49
50 default:
51 if(!$cmd || $cmd == 'view')
52 {
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()
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$cmd
Definition: sahs_server.php:35

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

+ Here is the call graph for this function:

◆ infoScreen()

ilRemoteObjectBaseGUI::infoScreen ( )

show info screen

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

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

References $ilErr, $ilUser, $info, 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 140 of file class.ilRemoteObjectBaseGUI.php.

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

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 242 of file class.ilRemoteObjectBaseGUI.php.

243 {
244 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
245 $form = new ilPropertyFormGUI();
246 $form->setFormAction($this->ctrl->getFormAction($this));
247 $form->setTitle($this->lng->txt('ecs_general_info'));
248 $form->addCommandButton('update',$this->lng->txt('save'));
249 $form->addCommandButton('edit',$this->lng->txt('cancel'));
250
251 $text = new ilTextInputGUI($this->lng->txt('title'),'title');
252 $text->setValue($this->object->getTitle());
253 $text->setSize(min(40, ilObject::TITLE_LENGTH));
254 $text->setMaxLength(ilObject::TITLE_LENGTH);
255 $text->setDisabled(true);
256 $form->addItem($text);
257
258 $area = new ilTextAreaInputGUI($this->lng->txt('description'),'description');
259 $area->setValue($this->object->getDescription());
260 $area->setRows(3);
261 $area->setCols(80);
262 $area->setDisabled(true);
263 $form->addItem($area);
264
265 $area = new ilTextAreaInputGUI($this->lng->txt('ecs_local_information'),'local_info');
266 $area->setValue($this->object->getLocalInformation());
267 $area->setRows(3);
268 $area->setCols(80);
269 $form->addItem($area);
270
271 $this->addCustomEditForm($form);
272
273 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
275 $this->getType(),$this->object->getId());
276 $record_gui->setPropertyForm($form);
277 $record_gui->parse();
278
279 return $form;
280 }
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.
$text

References $text, 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 84 of file class.ilRemoteObjectBaseGUI.php.

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

References 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 $ilUser;
68
69 if($ilUser->getId() == ANONYMOUS_USER_ID ||
70 $this->object->isLocalObject())
71 {
72 ilUtil::redirect($this->object->getRemoteLink());
73 }
74 else
75 {
76 $link = $this->object->getFullRemoteLink();
77 ilUtil::redirect($link);
78 }
79 }

References $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 333 of file class.ilRemoteObjectBaseGUI.php.

334 {
335
336 }

Referenced by updateObject().

+ Here is the caller graph for this function:

◆ updateObject()

ilRemoteObjectBaseGUI::updateObject ( )

update object

Reimplemented from ilObjectGUI.

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

296 {
297 global $ilErr;
298
299 if(!$this->checkPermissionBool('write'))
300 {
301 $ilErr->raiseError($this->lng->txt('msg_no_perm_read'),$ilErr->MESSAGE);
302 }
303
304 $form = $this->initEditForm();
305 if($form->checkInput())
306 {
307 $this->object->setLocalInformation($a_form->getInput('local_info'));
308
309 $this->updateCustomValues($form);
310
311 $this->object->update();
312
313 // Save advanced meta data
314 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
316 $this->getType(), $this->object->getId());
317 $record_gui->loadFromPost();
318 $record_gui->saveValues();
319
320 ilUtil::sendSuccess($this->lng->txt("settings_saved"));
321 $this->editObject();
322 }
323
324 $form->setValuesByPost();
325 $this->editObject($form);
326 }
editObject()
edit object
updateCustomValues(ilPropertyFormGUI $a_form)
Update object custom values.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

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

+ Here is the call graph for this function:

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