ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 ()
 
 prepareOutput ($a_show_subobjects=true)
 
 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 public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Static Public Member Functions

static _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...
 
 setTitleAndDescription ()
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 
 setTargetFrame ($a_cmd, $a_target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 
 showActions ()
 
 getTabs ()
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs 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...
 
 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
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

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

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

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

Referenced by initEditForm().

284  {
285  }
+ 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 205 of file class.ilRemoteObjectBaseGUI.php.

Referenced by infoScreen().

206  {
207  }
+ Here is the caller graph for this function:

◆ callObject()

ilRemoteObjectBaseGUI::callObject ( )

call remote object

Returns
bool

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

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

109  {
110  include_once './Services/Tracking/classes/class.ilChangeEvent.php';
112  $this->getType(),
113  $this->object->getRefId(),
114  $this->object->getId(),
115  $GLOBALS['ilUser']->getId()
116  );
117 
118 
119  // check if the assigned object is hosted on the same installation
120  $link = $this->object->getFullRemoteLink();
121  if ($link) {
122  ilUtil::redirect($link);
123  return true;
124  } else {
125  ilUtil::sendFailure('Cannot call remote object.');
126  $this->infoScreenObject();
127  return false;
128  }
129  }
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.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
getType()
Functions that must be overwritten.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Create new PHPExcel object
obj_idprivate
static redirect($a_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 214 of file class.ilRemoteObjectBaseGUI.php.

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

215  {
216  global $ilErr,$ilTabs;
217 
218  if (!$this->checkPermissionBool('write')) {
219  $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->MESSAGE);
220  }
221 
222  $ilTabs->activateTab('edit');
223 
224  if (!$a_form) {
225  $a_form = $this->initEditForm();
226  }
227  $this->tpl->setContent($a_form->getHTML());
228  }
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 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  case 'ilinfoscreengui':
33  // forwards command
34  $this->infoScreen();
35  break;
36 
37  case 'ilpermissiongui':
38  $ilTabs->activateTab('id_permissions');
39  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
40  $this->ctrl->forwardCommand(new ilPermissionGUI($this));
41  break;
42 
43  case "ilcommonactiondispatchergui":
44  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
46  $this->ctrl->forwardCommand($gui);
47  break;
48 
49  default:
50  if (!$cmd || $cmd == 'view') {
51  $cmd = "editSettings";
52  }
53  $cmd .= "Object";
54  $this->$cmd();
55  break;
56  }
57  return true;
58  }
prepareOutput($a_show_subobjects=true)
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 146 of file class.ilRemoteObjectBaseGUI.php.

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

Referenced by executeCommand(), and infoScreenObject().

147  {
148  global $ilErr,$ilUser,$ilTabs;
149 
150  if (!$this->checkPermissionBool('visible')) {
151  $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->MESSAGE);
152  }
153 
154  $ilTabs->activateTab('info');
155 
156  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
157  $info = new ilInfoScreenGUI($this);
158 
159  if ($ilUser->getId() == ANONYMOUS_USER_ID ||
160  $this->object->isLocalObject()) {
161  $info->addButton(
162  $this->lng->txt($this->getType() . '_call'),
163  $this->object->getRemoteLink(),
164  'target="_blank"'
165  );
166  } else {
167  $info->addButton(
168  $this->lng->txt($this->getType() . '_call'),
169  $this->ctrl->getLinkTarget($this, 'call'),
170  'target="_blank"'
171  );
172  }
173 
174  $info->addSection($this->lng->txt('ecs_general_info'));
175  $info->addProperty($this->lng->txt('title'), $this->object->getTitle());
176  if (strlen($this->object->getOrganization())) {
177  $info->addProperty($this->lng->txt('organization'), $this->object->getOrganization());
178  }
179  if (strlen($this->object->getDescription())) {
180  $info->addProperty($this->lng->txt('description'), $this->object->getDescription());
181  }
182  if (strlen($loc = $this->object->getLocalInformation())) {
183  $info->addProperty($this->lng->txt('ecs_local_information'), $this->object->getLocalInformation());
184  }
185 
186  $this->addCustomInfoFields($info);
187 
188  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
189  $record_gui = new ilAdvancedMDRecordGUI(
191  $this->getType(),
192  $this->object->getId()
193  );
194  $record_gui->setInfoObject($info);
195  $record_gui->parse();
196 
197  $this->ctrl->forwardCommand($info);
198  }
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.
$ilUser
Definition: imgupload.php:18
Create new PHPExcel object
obj_idprivate
$info
Definition: index.php:5
+ 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 136 of file class.ilRemoteObjectBaseGUI.php.

References infoScreen().

Referenced by callObject().

137  {
138  $this->ctrl->setCmd("showSummary");
139  $this->ctrl->setCmdClass("ilinfoscreengui");
140  $this->infoScreen();
141  }
+ 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 235 of file class.ilRemoteObjectBaseGUI.php.

References $form, $text, addCustomEditForm(), ilObject2GUI\getType(), ilAdvancedMDRecordGUI\MODE_EDITOR, object, ilAdvancedMDRecordGUI\setPropertyForm(), ilTextAreaInputGUI\setValue(), and ilObject\TITLE_LENGTH.

Referenced by editObject(), and updateObject().

236  {
237  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
238  $form = new ilPropertyFormGUI();
239  $form->setFormAction($this->ctrl->getFormAction($this));
240  $form->setTitle($this->lng->txt('ecs_general_info'));
241  $form->addCommandButton('update', $this->lng->txt('save'));
242  $form->addCommandButton('edit', $this->lng->txt('cancel'));
243 
244  $text = new ilTextInputGUI($this->lng->txt('title'), 'title');
245  $text->setValue($this->object->getTitle());
246  $text->setSize(min(40, ilObject::TITLE_LENGTH));
247  $text->setMaxLength(ilObject::TITLE_LENGTH);
248  $text->setDisabled(true);
249  $form->addItem($text);
250 
251  $area = new ilTextAreaInputGUI($this->lng->txt('description'), 'description');
252  $area->setValue($this->object->getDescription());
253  $area->setRows(3);
254  $area->setCols(80);
255  $area->setDisabled(true);
256  $form->addItem($area);
257 
258  $area = new ilTextAreaInputGUI($this->lng->txt('ecs_local_information'), 'local_info');
259  $area->setValue($this->object->getLocalInformation());
260  $area->setRows(3);
261  $area->setCols(80);
262  $form->addItem($area);
263 
264  $this->addCustomEditForm($form);
265 
266  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
267  $record_gui = new ilAdvancedMDRecordGUI(
269  $this->getType(),
270  $this->object->getId()
271  );
272  $record_gui->setPropertyForm($form);
273  $record_gui->parse();
274 
275  return $form;
276  }
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.
if(isset($_POST['submit'])) $form
getType()
Functions that must be overwritten.
$text
Definition: errorreport.php:18
This class represents a text property in a property form.
Create new PHPExcel object
obj_idprivate
This class represents a text area property in a property form.
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 79 of file class.ilRemoteObjectBaseGUI.php.

References ilObject2GUI\checkPermissionBool().

80  {
81  global $ilTabs;
82 
83  if ($this->checkPermissionBool('visible')) {
84  $ilTabs->addTab(
85  "info",
86  $this->lng->txt("info_short"),
87  $this->ctrl->getLinkTarget($this, "infoScreen")
88  );
89  }
90 
91  if ($this->checkPermissionBool('write')) {
92  $ilTabs->addTab(
93  "edit",
94  $this->lng->txt("edit"),
95  $this->ctrl->getLinkTarget($this, "edit")
96  );
97  }
98 
99  // will add permissions if needed
100  parent::setTabs();
101  }
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 63 of file class.ilRemoteObjectBaseGUI.php.

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

64  {
65  global $ilUser;
66 
67  if ($ilUser->getId() == ANONYMOUS_USER_ID ||
68  $this->object->isLocalObject()) {
69  ilUtil::redirect($this->object->getRemoteLink());
70  } else {
71  $link = $this->object->getFullRemoteLink();
72  ilUtil::redirect($link);
73  }
74  }
$ilUser
Definition: imgupload.php:18
Create new PHPExcel object
obj_idprivate
static redirect($a_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 329 of file class.ilRemoteObjectBaseGUI.php.

Referenced by updateObject().

330  {
331  }
+ Here is the caller graph for this function:

◆ updateObject()

ilRemoteObjectBaseGUI::updateObject ( )

update object

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

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

291  {
292  global $ilErr;
293 
294  if (!$this->checkPermissionBool('write')) {
295  $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->MESSAGE);
296  }
297 
298  $form = $this->initEditForm();
299  if ($form->checkInput()) {
300  $this->object->setLocalInformation($a_form->getInput('local_info'));
301 
302  $this->updateCustomValues($form);
303 
304  $this->object->update();
305 
306  // Save advanced meta data
307  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
308  $record_gui = new ilAdvancedMDRecordGUI(
310  $this->getType(),
311  $this->object->getId()
312  );
313  $record_gui->loadFromPost();
314  $record_gui->saveValues();
315 
316  ilUtil::sendSuccess($this->lng->txt("settings_saved"));
317  $this->editObject();
318  }
319 
320  $form->setValuesByPost();
321  $this->editObject($form);
322  }
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.
if(isset($_POST['submit'])) $form
getType()
Functions that must be overwritten.
editObject()
edit object
Create new PHPExcel object
obj_idprivate
updateCustomValues(ilPropertyFormGUI $a_form)
Update object custom values.
initEditForm()
Init edit settings form.
+ Here is the call graph for this function:

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