ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ilObjFileServicesGUI Class Reference

Class ilObjFileServicesGUI. More...

+ Inheritance diagram for ilObjFileServicesGUI:
+ Collaboration diagram for ilObjFileServicesGUI:

Public Member Functions

 __construct (int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
 Constructor @access public. More...
 
 getType ()
 Functions that must be overwritten. More...
 
 executeCommand ()
 Execute command @access public. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 setTitleAndDescription ()
 
- 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)
 

Data Fields

const CMD_EDIT_SETTINGS = 'editSettings'
 
ilLanguage $lng
 
ilErrorHandling $error_handling
 
ilGlobalTemplateInterface $tpl
 
- 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

 checkPermissionOrFail (string $str)
 
 hasUserPermissionTo (string $str)
 
 editSettings ()
 
 saveSettings ()
 
- 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)
 

Protected Attributes

const TAB_PERMISSIONS = 'perm_settings'
 
const TAB_SETTINGS = 'settings'
 
const TAB_OVERVIEW = 'resource_overview'
 
const TAB_UPLOAD_LIMITS = 'upload_limits'
 
const TAB_WOPI = 'wopi_settings'
 
ilTabsGUI $tabs
 
ilCtrl $ctrl
 
ilSetting $settings
 
Factory $refinery
 
ilFileServicesSettings $file_service_settings
 
- 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 = ""
 

Private Member Functions

 initSettingsForm ()
 

Additional Inherited Members

- 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)
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjFileServicesGUI::__construct ( int  $id = 0,
int  $id_type = self::REPOSITORY_NODE_ID,
int  $parent_node_id = 0 
)

Constructor @access public.

Reimplemented from ilObject2GUI.

Definition at line 52 of file class.ilObjFileServicesGUI.php.

53 {
54 global $DIC;
55
57 parent::__construct($id, $id_type, $parent_node_id);
58
59 $this->tabs = $DIC['ilTabs'];
60 $this->lng = $DIC->language();
61 $this->lng->loadLanguageModule('adn');
62 $this->lng->loadLanguageModule('irss');
63 $this->lng->loadLanguageModule('wopi');
64 $this->ctrl = $DIC['ilCtrl'];
65 $this->tpl = $DIC['tpl'];
66 $this->tree = $DIC['tree'];
67 $this->settings = $DIC['ilSetting'];
68 $this->error_handling = $DIC["ilErr"];
69 $this->ref_id = $this->request_wrapper->retrieve('ref_id', $DIC->refinery()->kindlyTo()->int());
70 $this->refinery = $DIC->refinery();
71 $this->file_service_settings = $DIC->fileServiceSettings();
72 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ilObjectGUI\$id, ilObject2GUI\$id_type, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), ILIAS\Repository\settings(), ILIAS\Repository\tabs(), and ilObjFileServices\TYPE_FILE_SERVICES.

+ Here is the call graph for this function:

Member Function Documentation

◆ checkPermissionOrFail()

ilObjFileServicesGUI::checkPermissionOrFail ( string  $str)
protected

Definition at line 79 of file class.ilObjFileServicesGUI.php.

79 : void
80 {
81 if (!$this->hasUserPermissionTo($str)) {
82 $this->error_handling->raiseError(
83 $this->lng->txt('no_permission'),
84 $this->error->MESSAGE
85 );
86 }
87 }

References hasUserPermissionTo(), and ILIAS\Repository\lng().

Referenced by editSettings(), executeCommand(), and saveSettings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editSettings()

ilObjFileServicesGUI::editSettings ( )
protected

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

278 : void
279 {
280 $this->tabs_gui->setTabActive(self::TAB_SETTINGS);
281
282 $this->checkPermissionOrFail("read");
283
284 // get form
285 $form = $this->initSettingsForm();
286
287 // set current values
288 $val = [];
289 $val["suffix_repl_additional"] = implode(", ", $this->file_service_settings->getWhiteListNegative());
290 $val["suffix_custom_white_list"] = implode(", ", $this->file_service_settings->getWhiteListPositive());
291 $val["suffix_custom_expl_black"] = implode(", ", $this->file_service_settings->getProhibited());
292 $form->setValuesByArray($val);
293
294 // set content
295 $this->tpl->setContent($form->getHTML());
296 }

References checkPermissionOrFail(), and initSettingsForm().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjFileServicesGUI::executeCommand ( )

Execute command @access public.

Reimplemented from ilObject2GUI.

Definition at line 99 of file class.ilObjFileServicesGUI.php.

99 : void
100 {
101 $this->lng->loadLanguageModule("fils");
102
103 $next_class = $this->ctrl->getNextClass($this);
104 $cmd = $this->ctrl->getCmd();
105
106 $this->prepareOutput();
107 $this->checkPermissionOrFail('read');
108
109 switch ($next_class) {
110 case strtolower(ilPermissionGUI::class):
111 $this->tabs_gui->activateTab(self::TAB_PERMISSIONS);
112 $perm_gui = new ilPermissionGUI($this);
113 $this->ctrl->forwardCommand($perm_gui);
114 break;
115 case strtolower(ilResourceOverviewGUI::class):
116 $this->tabs_gui->activateTab(self::TAB_OVERVIEW);
117 $overview = new ilResourceOverviewGUI();
118 $this->ctrl->forwardCommand($overview);
119 break;
120 case strtolower(ilUploadLimitsOverviewGUI::class):
121 $this->tabs_gui->activateTab(self::TAB_UPLOAD_LIMITS);
122 $limits_gui = new ilUploadLimitsOverviewGUI();
123 $this->ctrl->forwardCommand($limits_gui);
124 break;
125 case strtolower(ilWOPIAdministrationGUI::class):
126 $this->tabs_gui->activateTab(self::TAB_WOPI);
127 $wopi_gui = new ilWOPIAdministrationGUI();
128 $this->ctrl->forwardCommand($wopi_gui);
129 break;
130 default:
131 if (!$cmd || $cmd === 'view') {
133 }
134 $this->$cmd();
135 break;
136 }
137 }
prepareOutput(bool $show_sub_objects=true)

References checkPermissionOrFail(), CMD_EDIT_SETTINGS, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilObject2GUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjFileServicesGUI::getAdminTabs ( )

Get tabs.

Reimplemented from ilObjectGUI.

Definition at line 143 of file class.ilObjFileServicesGUI.php.

143 : void
144 {
145 // General Settings for File-Services
146 if ($this->rbac_system->checkAccess(
147 "read",
148 $this->object->getRefId()
149 )
150 ) {
151 $this->tabs_gui->addTab(
152 self::TAB_SETTINGS,
153 $this->lng->txt(self::TAB_SETTINGS),
154 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS)
155 );
156 }
157 // Resource-Overview
158 if ($this->rbac_system->checkAccess(
159 "read",
160 $this->object->getRefId()
161 )
162 ) {
163 $this->tabs_gui->addTab(
164 self::TAB_OVERVIEW,
165 $this->lng->txt(self::TAB_OVERVIEW),
166 $this->ctrl->getLinkTargetByClass(ilResourceOverviewGUI::class),
167 );
168 }
169 // Upload-Limit
170 if ($this->rbac_system->checkAccess(
171 "read",
172 $this->object->getRefId()
173 )
174 ) {
175 $this->tabs_gui->addTab(
176 self::TAB_UPLOAD_LIMITS,
177 $this->lng->txt(self::TAB_UPLOAD_LIMITS),
178 $this->ctrl->getLinkTargetByClass(ilUploadLimitsOverviewGUI::class),
179 );
180 }
181 // WOPI
182 if ($this->rbac_system->checkAccess(
183 "read",
184 $this->object->getRefId()
185 )
186 ) {
187 $this->tabs_gui->addTab(
188 self::TAB_WOPI,
189 $this->lng->txt(self::TAB_WOPI),
190 $this->ctrl->getLinkTargetByClass(ilWOPIAdministrationGUI::class),
191 );
192 }
193
194 // Permissions-tab
195 if ($this->rbac_system->checkAccess(
196 'edit_permission',
197 $this->object->getRefId()
198 )
199 ) {
200 $this->tabs_gui->addTab(
201 self::TAB_PERMISSIONS,
202 $this->lng->txt(self::TAB_PERMISSIONS),
203 $this->ctrl->getLinkTargetByClass(ilPermissionGUI::class, "perm")
204 );
205 }
206 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getType()

ilObjFileServicesGUI::getType ( )

Functions that must be overwritten.

Reimplemented from ilObject2GUI.

Definition at line 74 of file class.ilObjFileServicesGUI.php.

74 : string
75 {
77 }

References ilObjFileServices\TYPE_FILE_SERVICES.

◆ hasUserPermissionTo()

ilObjFileServicesGUI::hasUserPermissionTo ( string  $str)
protected

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

89 : bool
90 {
91 return $this->access->checkAccess($str, '', $this->ref_id);
92 }

References ILIAS\Repository\access().

Referenced by checkPermissionOrFail(), and initSettingsForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSettingsForm()

ilObjFileServicesGUI::initSettingsForm ( )
private

Definition at line 215 of file class.ilObjFileServicesGUI.php.

216 {
217 $permission_to_write = $this->hasUserPermissionTo('write');
218
219 $form = new ilPropertyFormGUI();
220 $form->setFormAction($this->ctrl->getFormAction($this));
221 $form->setTitle($this->lng->txt(self::TAB_SETTINGS));
222
223 // default positive list
224 $ne = new ilNonEditableValueGUI($this->lng->txt("file_suffix_default_positive"), "");
225 $ne->setValue(implode(", ", $this->file_service_settings->getDefaultWhitelist()));
226 $ne->setInfo($this->lng->txt("file_suffix_default_positive_info"));
227 $form->addItem($ne);
228
229 // file suffix custom negative list
230 $ta = new ilTextAreaInputGUI(
231 $this->lng->txt(
232 "file_suffix_custom_negative"
233 ),
234 "suffix_repl_additional"
235 );
236 $ta->setInfo($this->lng->txt("file_suffix_custom_negative_info"));
237 $ta->setRows(5);
238 $ta->setDisabled(!$permission_to_write);
239 $form->addItem($ta);
240
241 // file suffix custom positive list
242 $ta = new ilTextAreaInputGUI(
243 $this->lng->txt(
244 "file_suffix_custom_positive"
245 ),
246 "suffix_custom_white_list"
247 );
248 $ta->setInfo($this->lng->txt("file_suffix_custom_positive_info"));
249 $ta->setRows(5);
250 $ta->setDisabled(!$permission_to_write);
251 $form->addItem($ta);
252
253 // resulting overall positive list
254 $ne = new ilNonEditableValueGUI($this->lng->txt("file_suffix_overall_positive"), "");
255 $ne->setValue(implode(", ", $this->file_service_settings->getWhiteListedSuffixes()));
256 $ne->setInfo($this->lng->txt("file_suffix_overall_positive_info"));
257 $form->addItem($ne);
258
259 // explicit negative list
260 $ta = new ilTextAreaInputGUI(
261 $this->lng->txt("file_suffix_custom_expl_negative"),
262 "suffix_custom_expl_black"
263 );
264 $ta->setInfo($this->lng->txt("file_suffix_custom_expl_negative_info"));
265 $ta->setRows(5);
266 $ta->setDisabled(!$permission_to_write);
267 $form->addItem($ta);
268
269 // command buttons
270 if ($permission_to_write) {
271 $form->addCommandButton('saveSettings', $this->lng->txt('save'));
272 $form->addCommandButton('view', $this->lng->txt('cancel'));
273 }
274
275 return $form;
276 }
This class represents a non editable value in a property form.
This class represents a property form user interface.
This class represents a text area property in a property form.

References ILIAS\Repository\ctrl(), hasUserPermissionTo(), and ILIAS\Repository\lng().

Referenced by editSettings(), and saveSettings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveSettings()

ilObjFileServicesGUI::saveSettings ( )
protected

Definition at line 298 of file class.ilObjFileServicesGUI.php.

298 : void
299 {
300 $this->checkPermissionOrFail("write");
301
302 // get form
303 $form = $this->initSettingsForm();
304 if ($form->checkInput()) {
305 $trafo = (fn(string $id): ?string => $this->post_wrapper->has($id)
306 ? $this->post_wrapper->retrieve($id, $this->refinery->to()->string())
307 : null);
308
309
310 $this->settings->set("suffix_repl_additional", $trafo("suffix_repl_additional"));
311 $this->settings->set("suffix_custom_white_list", $trafo("suffix_custom_white_list"));
312 $this->settings->set("suffix_custom_expl_black", $trafo("suffix_custom_expl_black"));
313
314 $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
315 $this->ctrl->redirect($this, self::CMD_EDIT_SETTINGS);
316 } else {
317 $form->setValuesByPost();
318 $this->tpl->setContent($form->getHTML());
319 }
320 }
has(string $class_name)
to(\GdImage $image, ?int $quality=null)
Currently this is the only way to make a FileStream from a GD image resource.

References ilObjectGUI\$id, checkPermissionOrFail(), ILIAS\Repository\ctrl(), initSettingsForm(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\Repository\settings().

+ Here is the call graph for this function:

◆ setTitleAndDescription()

ilObjFileServicesGUI::setTitleAndDescription ( )

Reimplemented from ilObject2GUI.

Definition at line 209 of file class.ilObjFileServicesGUI.php.

209 : void
210 {
211 parent::setTitleAndDescription();
212 $this->tpl->setDescription($this->object->getDescription());
213 }

References ILIAS\Repository\object().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilObjFileServicesGUI::$ctrl
protected

Definition at line 42 of file class.ilObjFileServicesGUI.php.

◆ $error_handling

ilErrorHandling ilObjFileServicesGUI::$error_handling

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

◆ $file_service_settings

ilFileServicesSettings ilObjFileServicesGUI::$file_service_settings
protected

Definition at line 46 of file class.ilObjFileServicesGUI.php.

◆ $lng

ilLanguage ilObjFileServicesGUI::$lng

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

◆ $refinery

Factory ilObjFileServicesGUI::$refinery
protected

Definition at line 45 of file class.ilObjFileServicesGUI.php.

◆ $settings

ilSetting ilObjFileServicesGUI::$settings
protected

Definition at line 43 of file class.ilObjFileServicesGUI.php.

◆ $tabs

ilTabsGUI ilObjFileServicesGUI::$tabs
protected

Definition at line 39 of file class.ilObjFileServicesGUI.php.

◆ $tpl

ilGlobalTemplateInterface ilObjFileServicesGUI::$tpl

Definition at line 44 of file class.ilObjFileServicesGUI.php.

◆ CMD_EDIT_SETTINGS

const ilObjFileServicesGUI::CMD_EDIT_SETTINGS = 'editSettings'

Definition at line 32 of file class.ilObjFileServicesGUI.php.

Referenced by executeCommand().

◆ TAB_OVERVIEW

const ilObjFileServicesGUI::TAB_OVERVIEW = 'resource_overview'
protected

Definition at line 35 of file class.ilObjFileServicesGUI.php.

◆ TAB_PERMISSIONS

const ilObjFileServicesGUI::TAB_PERMISSIONS = 'perm_settings'
protected

Definition at line 33 of file class.ilObjFileServicesGUI.php.

◆ TAB_SETTINGS

const ilObjFileServicesGUI::TAB_SETTINGS = 'settings'
protected

Definition at line 34 of file class.ilObjFileServicesGUI.php.

◆ TAB_UPLOAD_LIMITS

const ilObjFileServicesGUI::TAB_UPLOAD_LIMITS = 'upload_limits'
protected

Definition at line 36 of file class.ilObjFileServicesGUI.php.

◆ TAB_WOPI

const ilObjFileServicesGUI::TAB_WOPI = 'wopi_settings'
protected

Definition at line 37 of file class.ilObjFileServicesGUI.php.


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