ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
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)
 
 executeCommand ()
 
 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)
 
 getCreationMode ()
 
 isVisible ()
 
 trash ()
 
 undelete ()
 
 cancelDelete ()
 
 removeFromSystem ()
 
 cloneAll ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 Deleted in ilObject. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 Import. More...
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Static Public Member Functions

static _goto ($a_target)
 redirect script 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 ()
 
 setTitleAndDescription ()
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 
 setTargetFrame ($a_cmd, $a_target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 setColumnSettings ($column_gui)
 
 checkPermission ($a_perm, $a_cmd="")
 
 showPossibleSubObjects ()
 
 redirectToRefId ()
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ()
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ()
 Deprecated functions. More...
 
 setReturnLocation ()
 
 showActions ()
 
 getTitlesByRefId ()
 
 getTabs ()
 
 __showButton ()
 
 hitsperpageObject ()
 
 __initTableGUI ()
 
 __setTableGUIBasicData ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

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
 

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 
)

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

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

335  {
336  global $ilErr, $lng, $ilAccess;
337 
338  //static if ($this->checkPermissionBool("visible", "", "", $a_target))
339  if($ilAccess->checkAccess('visible','',$a_target))
340  {
341  $_GET["cmd"] = "infoScreen";
342  $_GET["ref_id"] = $a_target;
343  $_GET["baseClass"] = "ilRepositoryGUI";
344  include("ilias.php");
345  exit;
346  }
347  //static else if ($this->checkPermissionBool("read", "", "", ROOT_FOLDER_ID))
348  if($ilAccess->checkAccess('read','',ROOT_FOLDER_ID))
349  {
350  $_GET["cmd"] = "frameset";
351  $_GET["target"] = "";
352  $_GET["ref_id"] = ROOT_FOLDER_ID;
353  ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
355  $_GET["baseClass"] = "ilRepositoryGUI";
356  include("ilias.php");
357  exit;
358  }
359 
360  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
361  }
exit
Definition: login.php:54
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
static _lookupObjId($a_id)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ 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

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

Referenced by initEditForm().

279  {
280 
281  }
+ 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

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

Referenced by infoScreen().

201  {
202 
203  }
+ 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.

References infoScreenObject(), ilUtil\redirect(), and ilUtil\sendFailure().

110  {
111  // check if the assigned object is hosted on the same installation
112  $link = $this->object->getFullRemoteLink();
113  if($link)
114  {
115  ilUtil::redirect($link);
116  return true;
117  }
118  else
119  {
120  ilUtil::sendFailure('Cannot call remote object.');
121  $this->infoScreenObject();
122  return false;
123  }
124  }
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

◆ editObject()

ilRemoteObjectBaseGUI::editObject ( ilPropertyFormGUI  $a_form = null)

Edit settings.

Parameters
ilPropertyFormGUI$a_form

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

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

211  {
212  global $ilErr,$ilTabs;
213 
214  if(!$this->checkPermissionBool('write'))
215  {
216  $ilErr->raiseError($this->lng->txt('msg_no_perm_read'),$ilErr->MESSAGE);
217  }
218 
219  $ilTabs->activateTab('edit');
220 
221  if(!$a_form)
222  {
223  $a_form = $this->initEditForm();
224  }
225  $this->tpl->setContent($a_form->getHTML());
226  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
initEditForm()
Init edit settings form.
+ Here is the call graph for this function:

◆ executeCommand()

ilRemoteObjectBaseGUI::executeCommand ( )

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

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

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  }
$cmd
Definition: sahs_server.php:35
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
+ Here is the call graph for this function:

◆ infoScreen()

ilRemoteObjectBaseGUI::infoScreen ( )

show info screen

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

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

Referenced by executeCommand(), and infoScreenObject().

142  {
143  global $ilErr,$ilUser,$ilTabs;
144 
145  if(!$this->checkPermissionBool('visible'))
146  {
147  $ilErr->raiseError($this->lng->txt('msg_no_perm_read'),$ilErr->MESSAGE);
148  }
149 
150  $ilTabs->activateTab('info');
151 
152  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
153  $info = new ilInfoScreenGUI($this);
154 
155  if($ilUser->getId() == ANONYMOUS_USER_ID ||
156  $this->object->isLocalObject())
157  {
158  $info->addButton($this->lng->txt($this->getType().'_call'),
159  $this->object->getRemoteLink(),
160  'target="_blank"');
161  }
162  else
163  {
164  $info->addButton($this->lng->txt($this->getType().'_call'),
165  $this->ctrl->getLinkTarget($this,'call'),
166  'target="_blank"');
167  }
168 
169  $info->addSection($this->lng->txt('ecs_general_info'));
170  $info->addProperty($this->lng->txt('title'),$this->object->getTitle());
171  if(strlen($this->object->getOrganization()))
172  {
173  $info->addProperty($this->lng->txt('organization'),$this->object->getOrganization());
174  }
175  if(strlen($this->object->getDescription()))
176  {
177  $info->addProperty($this->lng->txt('description'),$this->object->getDescription());
178  }
179  if(strlen($loc = $this->object->getLocalInformation()))
180  {
181  $info->addProperty($this->lng->txt('ecs_local_information'),$this->object->getLocalInformation());
182  }
183 
184  $this->addCustomInfoFields($info);
185 
186  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
188  $this->getType(),$this->object->getId());
189  $record_gui->setInfoObject($info);
190  $record_gui->parse();
191 
192  $this->ctrl->forwardCommand($info);
193  }
Class ilInfoScreenGUI.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
addCustomInfoFields(ilInfoScreenGUI $a_info)
Add custom fields to info screen.
setInfoObject($info)
get info sections
getType()
Functions that must be overwritten.
global $ilUser
Definition: imgupload.php:15
+ 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 131 of file class.ilRemoteObjectBaseGUI.php.

References infoScreen().

Referenced by callObject().

132  {
133  $this->ctrl->setCmd("showSummary");
134  $this->ctrl->setCmdClass("ilinfoscreengui");
135  $this->infoScreen();
136  }
+ 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

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

References addCustomEditForm(), ilObject2GUI\getType(), ilAdvancedMDRecordGUI\MODE_EDITOR, ilAdvancedMDRecordGUI\setPropertyForm(), ilTextInputGUI\setValue(), ilTextAreaInputGUI\setValue(), and ilObject\TITLE_LENGTH.

Referenced by editObject(), and updateObject().

234  {
235  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
236  $form = new ilPropertyFormGUI();
237  $form->setFormAction($this->ctrl->getFormAction($this));
238  $form->setTitle($this->lng->txt('ecs_general_info'));
239  $form->addCommandButton('update',$this->lng->txt('save'));
240  $form->addCommandButton('edit',$this->lng->txt('cancel'));
241 
242  $text = new ilTextInputGUI($this->lng->txt('title'),'title');
243  $text->setValue($this->object->getTitle());
244  $text->setSize(min(40, ilObject::TITLE_LENGTH));
245  $text->setMaxLength(ilObject::TITLE_LENGTH);
246  $text->setDisabled(true);
247  $form->addItem($text);
248 
249  $area = new ilTextAreaInputGUI($this->lng->txt('description'),'description');
250  $area->setValue($this->object->getDescription());
251  $area->setRows(3);
252  $area->setCols(80);
253  $area->setDisabled(true);
254  $form->addItem($area);
255 
256  $area = new ilTextAreaInputGUI($this->lng->txt('ecs_local_information'),'local_info');
257  $area->setValue($this->object->getLocalInformation());
258  $area->setRows(3);
259  $area->setCols(80);
260  $form->addItem($area);
261 
262  $this->addCustomEditForm($form);
263 
264  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
266  $this->getType(),$this->object->getId());
267  $record_gui->setPropertyForm($form);
268  $record_gui->parse();
269 
270  return $form;
271  }
This class represents a property form user interface.
setPropertyForm($form)
set property form object
const TITLE_LENGTH
max length of object title
setValue($a_value)
Set Value.
getType()
Functions that must be overwritten.
This class represents a text property in a property form.
This class represents a text area property in a property form.
setValue($a_value)
Set Value.
addCustomEditForm(ilPropertyFormGUI $a_form)
Add custom fields to edit form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilRemoteObjectBaseGUI::setTabs ( )

get tabs

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

References ilObject2GUI\checkPermissionBool().

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  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
+ Here is the call graph for this function:

◆ showObject()

ilRemoteObjectBaseGUI::showObject ( )

show remote object

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

References $ilUser, and ilUtil\redirect().

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  }
global $ilUser
Definition: imgupload.php:15
static redirect($a_script)
http redirect to other script
+ 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 324 of file class.ilRemoteObjectBaseGUI.php.

Referenced by updateObject().

325  {
326 
327  }
+ Here is the caller graph for this function:

◆ updateObject()

ilRemoteObjectBaseGUI::updateObject ( )

update object

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

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

287  {
288  global $ilErr;
289 
290  if(!$this->checkPermissionBool('write'))
291  {
292  $ilErr->raiseError($this->lng->txt('msg_no_perm_read'),$ilErr->MESSAGE);
293  }
294 
295  $form = $this->initEditForm();
296  if($form->checkInput())
297  {
298  $this->object->setLocalInformation($a_form->getInput('local_info'));
299 
300  $this->updateCustomValues($form);
301 
302  $this->object->update();
303 
304  // Save advanced meta data
305  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
307  $this->getType(), $this->object->getId());
308  $record_gui->loadFromPost();
309  $record_gui->saveValues();
310 
311  ilUtil::sendSuccess($this->lng->txt("settings_saved"));
312  $this->editObject();
313  }
314 
315  $form->setValuesByPost();
316  $this->editObject($form);
317  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
getType()
Functions that must be overwritten.
editObject()
edit object
updateCustomValues(ilPropertyFormGUI $a_form)
Update object custom values.
initEditForm()
Init edit settings form.
loadFromPost()
Load values from post.
+ Here is the call graph for this function:

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