ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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...
 
 callObject ()
 call remote object More...
 
 infoScreenObject ()
 this one is called from the info button in the repository More...
 
 infoScreen ()
 show info screen More...
 
 editObject (ilPropertyFormGUI $form=null)
 Edit settings. More...
 
 updateObject ()
 
- Public Member Functions inherited from ilObject2GUI
 __construct (int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
 
 executeCommand ()
 execute command More...
 
 getIdType ()
 
 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 (bool $mode=true)
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 isVisible (int $ref_id, string $type)
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 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...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static _goto (string $a_target)
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $obj, ?int $callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Data Fields

const TAB_ID_PERMISSIONS = "id_permissions"
 
- Data Fields inherited from ilObject2GUI
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 ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

Protected Member Functions

 setTabs ()
 get tabs More...
 
 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 ()
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) This should probably be moved elsewhere as done with RepUtil. More...
 
 setTitleAndDescription ()
 
 omitLocator (bool $omit=true)
 
 getTargetFrame (string $cmd, string $target_frame="")
 
 setTargetFrame (string $cmd, string $target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 checkPermission (string $perm, string $cmd="", string $type="", int $ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId (int $ref_id, string $cmd="")
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 
 showActions ()
 
 getTabs ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 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 More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Private Attributes

ilLogger $logger
 

Additional Inherited Members

- Protected Attributes inherited from ilObject2GUI
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
int $request_ref_id
 
int $id_type
 
int $parent_id
 
string $type
 
string $html
 
int $object_id
 
int $node_id = null
 
array $creation_forms = []
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Detailed Description

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

Definition at line 23 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 29 of file class.ilRemoteObjectBaseGUI.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\lng(), and ILIAS\Repository\logger().

30  {
31  global $DIC;
32 
33  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
34 
35  $this->logger = $DIC->logger()->wsrv();
36 
37  $this->lng->loadLanguageModule('ecs');
38  }
global $DIC
Definition: shib_login.php:25
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilRemoteObjectBaseGUI::_goto ( string  $a_target)
static

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

References $DIC, $ilErr, ilObject2GUI\$lng, ilObjectGUI\_gotoRepositoryNode(), and ilLanguage\txt().

333  : void
334  {
335  global $DIC;
336 
337  $ilAccess = $DIC->access();
338  $ilErr = $DIC["ilErr"];
339  $lng = $DIC->language();
340  if ($ilAccess->checkAccess("read", "", (int) $a_target)) {
341  ilObjectGUI::_gotoRepositoryNode((int) $a_target);
342  }
343 
344  if ($ilAccess->checkAccess("visible", "", (int) $a_target)) {
345  ilObjectGUI::_gotoRepositoryNode((int) $a_target, "infoScreen");
346  }
347  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
348  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _gotoRepositoryNode(int $ref_id, string $cmd="")
$ilErr
Definition: raiseError.php:17
global $DIC
Definition: shib_login.php:25
+ 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 289 of file class.ilRemoteObjectBaseGUI.php.

Referenced by initEditForm().

289  : void
290  {
291  }
+ 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 218 of file class.ilRemoteObjectBaseGUI.php.

Referenced by infoScreen().

218  : void
219  {
220  // can be overwritten by subclasses
221  }
+ Here is the caller graph for this function:

◆ callObject()

ilRemoteObjectBaseGUI::callObject ( )

call remote object

Returns
bool

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

References ilChangeEvent\_recordReadEvent(), ILIAS\Repository\ctrl(), ilObject2GUI\getType(), infoScreenObject(), ILIAS\Repository\object(), and ILIAS\Repository\user().

134  : bool
135  {
137  $this->getType(),
138  $this->object->getRefId(),
139  $this->object->getId(),
140  $this->user->getId()
141  );
142 
143 
144  // check if the assigned object is hosted on the same installation
145  $link = $this->object->getFullRemoteLink();
146  if ($link) {
147  $this->ctrl->redirectToURL($link);
148  return true;
149  }
150 
151  $this->tpl->setOnScreenMessage('failure', 'Cannot call remote object.');
152  $this->infoScreenObject();
153  return false;
154  }
infoScreenObject()
this one is called from the info button in the repository
getType()
Functions that must be overwritten.
static _recordReadEvent(string $a_type, int $a_ref_id, int $obj_id, int $usr_id, bool $isCatchupWriteEvents=true, $a_ext_rc=null, $a_ext_time=null)
+ Here is the call graph for this function:

◆ editObject()

ilRemoteObjectBaseGUI::editObject ( ilPropertyFormGUI  $form = null)

Edit settings.

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

References ILIAS\Repository\access(), ilObject2GUI\checkPermissionBool(), initEditForm(), ILIAS\Repository\lng(), and ILIAS\Repository\logger().

226  : void
227  {
228  if (!$this->access->checkAccess("write", "", $this->object->getRefId())) {
229  $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->MESSAGE);
230  }
231  $this->logger->info("Can write:" . print_r($this->checkPermissionBool('write'), true));
232  $this->tabs_gui->activateTab('edit');
233 
234  if (!$form) {
235  $form = $this->initEditForm();
236  }
237  $this->tpl->setContent($form->getHTML());
238  }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
initEditForm()
Init edit settings form.
+ Here is the call graph for this function:

◆ executeCommand()

ilRemoteObjectBaseGUI::executeCommand ( )

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

References ilObjectGUI\$ref_id, ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), infoScreen(), ILIAS\Repository\logger(), ilObject2GUI\prepareOutput(), and ILIAS\Repository\user().

40  : void
41  {
42  $next_class = $this->ctrl->getNextClass($this);
43  $cmd = $this->ctrl->getCmd();
44 
45  $this->prepareOutput();
46  $this->logger->info("Can write:" . print_r($this->checkPermissionBool('write'), true));
47 
48  switch ($next_class) {
49  case 'ilinfoscreengui':
50  // forwards command
51  $this->infoScreen();
52  break;
53 
54  case 'ilpermissiongui':
55  $this->tabs_gui->activateTab('id_permissions');
56  $this->ctrl->forwardCommand(new ilPermissionGUI($this));
57  break;
58 
59  case "ilcommonactiondispatchergui":
61  $this->ctrl->forwardCommand($gui);
62  break;
63 
64  case strtolower(ilECSUserConsentModalGUI::class):
65  $consent_gui = new ilECSUserConsentModalGUI(
66  $this->user->getId(),
67  $this->ref_id,
68  $this
69  );
70  $this->ctrl->setReturn($this, 'call');
71  $this->ctrl->forwardCommand($consent_gui);
72  break;
73 
74  default:
75  if (!$cmd || $cmd === 'view') {
76  $cmd = "infoScreen";
77  }
78  $cmd .= "Object";
79  $this->logger->info("cmd before call:" . print_r($cmd, true));
80  $this->$cmd();
81  break;
82  }
83  $this->logger->info("cmd:" . print_r($cmd, true));
84  }
prepareOutput(bool $show_sub_objects=true)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
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 167 of file class.ilRemoteObjectBaseGUI.php.

References ilObjectGUI\$ref_id, ILIAS\Repository\access(), addCustomInfoFields(), ilECSUserConsentModalGUI\addLinkToToolbar(), ILIAS\Repository\ctrl(), ilObject2GUI\getType(), ILIAS\Repository\lng(), ilAdvancedMDRecordGUI\MODE_INFO, ILIAS\Repository\object(), ilAdvancedMDRecordGUI\setInfoObject(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

Referenced by executeCommand().

167  : void
168  {
169  if (!$this->access->checkAccess("visible", "", $this->object->getRefId())) {
170  $this->error->raiseError(
171  $this->lng->txt('msg_no_perm_read'),
172  $this->error->MESSAGE
173  );
174  }
175 
176  $this->ctrl->setReturn($this, 'call');
177  $consent_gui = new ilECSUserConsentModalGUI(
178  $this->user->getId(),
180  $this
181  );
182  $consent_gui->addLinkToToolbar($this->toolbar);
183 
184  $this->tabs_gui->activateTab('info');
185 
186  $info = new ilInfoScreenGUI($this);
187 
188  $info->addSection($this->lng->txt('ecs_general_info'));
189  $info->addProperty($this->lng->txt('title'), $this->object->getTitle());
190  if ($this->object->getOrganization()) {
191  $info->addProperty($this->lng->txt('organization'), $this->object->getOrganization());
192  }
193  if ($this->object->getDescription()) {
194  $info->addProperty($this->lng->txt('description'), $this->object->getDescription());
195  }
196  if ($this->object->getLocalInformation()) {
197  $info->addProperty($this->lng->txt('ecs_local_information'), $this->object->getLocalInformation());
198  }
199 
200  $this->addCustomInfoFields($info);
201 
202  $record_gui = new ilAdvancedMDRecordGUI(
204  $this->getType(),
205  $this->object->getId()
206  );
207  $record_gui->setInfoObject($info);
208  $record_gui->parse();
209 
210  $this->ctrl->forwardCommand($info);
211  }
addCustomInfoFields(ilInfoScreenGUI $a_info)
Add custom fields to info screen.
getType()
Functions that must be overwritten.
setInfoObject(ilInfoScreenGUI $info)
get info sections
+ 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

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

References ILIAS\Repository\ctrl().

Referenced by callObject().

159  : void
160  {
161  $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
162  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initEditForm()

ilRemoteObjectBaseGUI::initEditForm ( )
protected

Init edit settings form.

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

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

Referenced by editObject(), and updateObject().

244  {
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  $record_gui = new ilAdvancedMDRecordGUI(
275  $this->getType(),
276  $this->object->getId()
277  );
278  $record_gui->setPropertyForm($form);
279  $record_gui->parse();
280 
281  return $form;
282  }
setPropertyForm(ilPropertyFormGUI $form)
const TITLE_LENGTH
getType()
Functions that must be overwritten.
$text
Definition: xapiexit.php:21
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 ( )
protected

get tabs

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

References ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

103  : void
104  {
105  if ($this->checkPermissionBool('visible')) {
106  $this->tabs_gui->addTab(
107  "info",
108  $this->lng->txt("info_short"),
109  $this->ctrl->getLinkTarget($this, "infoScreen")
110  );
111  }
112 
113  if ($this->checkPermissionBool('write')) {
114  $this->tabs_gui->addTab(
115  "edit",
116  $this->lng->txt("edit"),
117  $this->ctrl->getLinkTarget($this, "edit")
118  );
119  }
120  if ($this->checkPermissionBool("edit_permission")) {
121  $this->tabs_gui->addTab(
122  self::TAB_ID_PERMISSIONS,
123  $this->lng->txt("perm_settings"),
124  $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm")
125  );
126  }
127  }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
+ Here is the call graph for this function:

◆ showObject()

ilRemoteObjectBaseGUI::showObject ( )

show remote object

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

References ANONYMOUS_USER_ID, ILIAS\Repository\ctrl(), ILIAS\Repository\object(), and ILIAS\Repository\user().

89  : void
90  {
91  if ($this->user->getId() === ANONYMOUS_USER_ID ||
92  $this->object->isLocalObject()) {
93  $this->ctrl->redirectToURL($this->object->getRemoteLink());
94  } else {
95  $link = $this->object->getFullRemoteLink();
96  $this->ctrl->redirectToURL($link);
97  }
98  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
+ 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().

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

◆ updateObject()

ilRemoteObjectBaseGUI::updateObject ( )

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

References ilObject2GUI\checkPermissionBool(), ilObjectGUI\editObject(), ilObject2GUI\getType(), ilAdvancedMDRecordGUI\importEditFormPostValues(), initEditForm(), ILIAS\Repository\lng(), ilAdvancedMDRecordGUI\MODE_EDITOR, ILIAS\Repository\object(), and updateCustomValues().

293  : void
294  {
295  if (!$this->checkPermissionBool('write')) {
296  $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->MESSAGE);
297  }
298 
299  $form = $this->initEditForm();
300  if ($form->checkInput()) {
301  $this->object->setLocalInformation($form->getInput('local_info'));
302 
303  $this->updateCustomValues($form);
304 
305  $this->object->update();
306 
307  // Save advanced meta data
308  $record_gui = new ilAdvancedMDRecordGUI(
310  $this->getType(),
311  $this->object->getId()
312  );
313  $record_gui->importEditFormPostValues();
314  $record_gui->writeEditForm();
315 
316  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"));
317  $this->editObject();
318  }
319 
320  $form->setValuesByPost();
321  $this->editObject($form);
322  }
importEditFormPostValues()
Load edit form values from post.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
getType()
Functions that must be overwritten.
updateCustomValues(ilPropertyFormGUI $a_form)
Update object custom values.
initEditForm()
Init edit settings form.
+ Here is the call graph for this function:

Field Documentation

◆ $logger

ilLogger ilRemoteObjectBaseGUI::$logger
private

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

◆ TAB_ID_PERMISSIONS

const ilRemoteObjectBaseGUI::TAB_ID_PERMISSIONS = "id_permissions"

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


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