ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 execute command More...
 
 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 ()
 updates object entry in object_data More...
 
- 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)
 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)
 
 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="")
 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...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) 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...
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 showActions ()
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 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 ()
 @abstract 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
 
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
 
GlobalHttpState $http
 
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
 
CustomIconFactory $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 24 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 
)

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

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

31 {
32 global $DIC;
33
34 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
35
36 $this->logger = $DIC->logger()->wsrv();
37
38 $this->lng->loadLanguageModule('ecs');
39 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilRemoteObjectBaseGUI::_goto ( string  $a_target)
static

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

334 : void
335 {
336 global $DIC;
337
338 $ilAccess = $DIC->access();
339 $ilErr = $DIC["ilErr"];
340 $lng = $DIC->language();
341 if ($ilAccess->checkAccess("read", "", (int) $a_target)) {
342 ilObjectGUI::_gotoRepositoryNode((int) $a_target);
343 }
344
345 if ($ilAccess->checkAccess("visible", "", (int) $a_target)) {
346 ilObjectGUI::_gotoRepositoryNode((int) $a_target, "infoScreen");
347 }
348 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
349 }
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:33

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

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

290 : void
291 {
292 }

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

219 : void
220 {
221 // can be overwritten by subclasses
222 }

Referenced by infoScreen().

+ Here is the caller graph for this function:

◆ callObject()

ilRemoteObjectBaseGUI::callObject ( )

call remote object

Returns
bool

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

135 : bool
136 {
138 $this->getType(),
139 $this->object->getRefId(),
140 $this->object->getId(),
141 $this->user->getId()
142 );
143
144
145 // check if the assigned object is hosted on the same installation
146 $link = $this->object->getFullRemoteLink();
147 if ($link) {
148 $this->ctrl->redirectToURL($link);
149 return true;
150 }
151
152 $this->tpl->setOnScreenMessage('failure', 'Cannot call remote object.');
153 $this->infoScreenObject();
154 return false;
155 }
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)
getType()
Functions that must be overwritten.
infoScreenObject()
this one is called from the info button in the repository

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

+ Here is the call graph for this function:

◆ editObject()

ilRemoteObjectBaseGUI::editObject ( ?ilPropertyFormGUI  $form = null)

Edit settings.

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

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

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

+ Here is the call graph for this function:

◆ executeCommand()

ilRemoteObjectBaseGUI::executeCommand ( )

execute command

Reimplemented from ilObject2GUI.

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

41 : void
42 {
43 $next_class = $this->ctrl->getNextClass($this);
44 $cmd = $this->ctrl->getCmd();
45
46 $this->prepareOutput();
47 $this->logger->info("Can write:" . print_r($this->checkPermissionBool('write'), true));
48
49 switch ($next_class) {
50 case 'ilinfoscreengui':
51 // forwards command
52 $this->infoScreen();
53 break;
54
55 case 'ilpermissiongui':
56 $this->tabs_gui->activateTab('id_permissions');
57 $this->ctrl->forwardCommand(new ilPermissionGUI($this));
58 break;
59
60 case "ilcommonactiondispatchergui":
62 $this->ctrl->forwardCommand($gui);
63 break;
64
65 case strtolower(ilECSUserConsentModalGUI::class):
66 $consent_gui = new ilECSUserConsentModalGUI(
67 $this->user->getId(),
68 $this->ref_id,
69 $this
70 );
71 $this->ctrl->setReturn($this, 'call');
72 $this->ctrl->forwardCommand($consent_gui);
73 break;
74
75 default:
76 if (!$cmd || $cmd === 'view') {
77 $cmd = "infoScreen";
78 }
79 $cmd .= "Object";
80 $this->logger->info("cmd before call:" . print_r($cmd, true));
81 $this->$cmd();
82 break;
83 }
84 $this->logger->info("cmd:" . print_r($cmd, true));
85 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
prepareOutput(bool $show_sub_objects=true)

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

+ Here is the call graph for this function:

◆ infoScreen()

ilRemoteObjectBaseGUI::infoScreen ( )

show info screen

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

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

References $info, ILIAS\Repository\access(), addCustomInfoFields(), ILIAS\Repository\ctrl(), error(), ilObject2GUI\getType(), ILIAS\Repository\lng(), ilAdvancedMDRecordGUI\MODE_INFO, ILIAS\Repository\object(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

Referenced by executeCommand().

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

160 : void
161 {
162 $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
163 }

References ILIAS\Repository\ctrl().

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.

Reimplemented from ilObjectGUI.

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

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

References addCustomEditForm(), ILIAS\Repository\ctrl(), ilObject2GUI\getType(), ILIAS\Repository\lng(), ilAdvancedMDRecordGUI\MODE_EDITOR, ILIAS\Repository\object(), 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 ( )
protected

get tabs

Reimplemented from ilObject2GUI.

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

104 : void
105 {
106 if ($this->checkPermissionBool('visible')) {
107 $this->tabs_gui->addTab(
108 "info",
109 $this->lng->txt("info_short"),
110 $this->ctrl->getLinkTarget($this, "infoScreen")
111 );
112 }
113
114 if ($this->checkPermissionBool('write')) {
115 $this->tabs_gui->addTab(
116 "edit",
117 $this->lng->txt("edit"),
118 $this->ctrl->getLinkTarget($this, "edit")
119 );
120 }
121 if ($this->checkPermissionBool("edit_permission")) {
122 $this->tabs_gui->addTab(
123 self::TAB_ID_PERMISSIONS,
124 $this->lng->txt("perm_settings"),
125 $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm")
126 );
127 }
128 }

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

+ Here is the call graph for this function:

◆ showObject()

ilRemoteObjectBaseGUI::showObject ( )

show remote object

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

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

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

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

330 : void
331 {
332 }

Referenced by updateObject().

+ Here is the caller graph for this function:

◆ updateObject()

ilRemoteObjectBaseGUI::updateObject ( )

updates object entry in object_data

Reimplemented from ilObjectGUI.

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

294 : void
295 {
296 if (!$this->checkPermissionBool('write')) {
297 $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->MESSAGE);
298 }
299
300 $form = $this->initEditForm();
301 if ($form->checkInput()) {
302 $this->object->setLocalInformation($form->getInput('local_info'));
303
304 $this->updateCustomValues($form);
305
306 $this->object->update();
307
308 // Save advanced meta data
309 $record_gui = new ilAdvancedMDRecordGUI(
311 $this->getType(),
312 $this->object->getId()
313 );
314 $record_gui->importEditFormPostValues();
315 $record_gui->writeEditForm();
316
317 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"));
318 $this->editObject();
319 }
320
321 $form->setValuesByPost();
322 $this->editObject($form);
323 }
updateCustomValues(ilPropertyFormGUI $a_form)
Update object custom values.

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

+ Here is the call graph for this function:

Field Documentation

◆ $logger

ilLogger ilRemoteObjectBaseGUI::$logger
private

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

◆ TAB_ID_PERMISSIONS

const ilRemoteObjectBaseGUI::TAB_ID_PERMISSIONS = "id_permissions"

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


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