ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 public. More...
 
 getType ()
 
 executeCommand ()
 Execute command 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)
 
 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="")
 
 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)
 

Protected Attributes

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

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 public.

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

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

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->ctrl = $DIC['ilCtrl'];
64  $this->tpl = $DIC['tpl'];
65  $this->tree = $DIC['tree'];
66  $this->settings = $DIC['ilSetting'];
67  $this->error_handling = $DIC["ilErr"];
68  $this->http = $DIC->http()->wrapper();
69  $this->ref_id = $this->http->query()->retrieve('ref_id', $DIC->refinery()->kindlyTo()->int());
70  $this->refinery = $DIC->refinery();
71  $this->file_service_settings = $DIC->fileServiceSettings();
72  }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ 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.

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

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

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  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editSettings()

ilObjFileServicesGUI::editSettings ( )
protected

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

References checkPermissionOrFail(), and initSettingsForm().

260  : void
261  {
262  $this->tabs_gui->setTabActive(self::TAB_SETTINGS);
263 
264  $this->checkPermissionOrFail("visible,read");
265 
266  // get form
267  $form = $this->initSettingsForm();
268 
269  // set current values
270  $val = [];
271  $val["suffix_repl_additional"] = implode(", ", $this->file_service_settings->getWhiteListNegative());
272  $val["suffix_custom_white_list"] = implode(", ", $this->file_service_settings->getWhiteListPositive());
273  $val["suffix_custom_expl_black"] = implode(", ", $this->file_service_settings->getProhibited());
274  $form->setValuesByArray($val);
275 
276  // set content
277  $this->tpl->setContent($form->getHTML());
278  }
+ Here is the call graph for this function:

◆ executeCommand()

ilObjFileServicesGUI::executeCommand ( )

Execute command public.

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

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

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  default:
126  if (!$cmd || $cmd === 'view') {
127  $cmd = self::CMD_EDIT_SETTINGS;
128  }
129  $this->$cmd();
130  break;
131  }
132  }
prepareOutput(bool $show_sub_objects=true)
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjFileServicesGUI::getAdminTabs ( )

Get tabs.

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

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

138  : void
139  {
140  // General Settings for File-Services
141  if ($this->rbac_system->checkAccess(
142  "visible,read",
143  $this->object->getRefId()
144  )
145  ) {
146  $this->tabs_gui->addTab(
147  self::TAB_SETTINGS,
148  $this->lng->txt(self::TAB_SETTINGS),
149  $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS)
150  );
151  }
152  // Resource-Overview
153  if ($this->rbac_system->checkAccess(
154  "visible,read",
155  $this->object->getRefId()
156  )
157  ) {
158  $this->tabs_gui->addTab(
159  self::TAB_OVERVIEW,
160  $this->lng->txt(self::TAB_OVERVIEW),
161  $this->ctrl->getLinkTargetByClass(ilResourceOverviewGUI::class),
162  );
163  }
164  // Upload-Limit
165  if ($this->rbac_system->checkAccess(
166  "visible,read",
167  $this->object->getRefId()
168  )
169  ) {
170  $this->tabs_gui->addTab(
171  self::TAB_UPLOAD_LIMITS,
172  $this->lng->txt(self::TAB_UPLOAD_LIMITS),
173  $this->ctrl->getLinkTargetByClass(ilUploadLimitsOverviewGUI::class),
174  );
175  }
176  // Permissions-tab
177  if ($this->rbac_system->checkAccess(
178  'edit_permission',
179  $this->object->getRefId()
180  )
181  ) {
182  $this->tabs_gui->addTab(
183  self::TAB_PERMISSIONS,
184  $this->lng->txt(self::TAB_PERMISSIONS),
185  $this->ctrl->getLinkTargetByClass(ilPermissionGUI::class, "perm")
186  );
187  }
188  }
+ Here is the call graph for this function:

◆ getType()

ilObjFileServicesGUI::getType ( )

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

References ilObjFileServices\TYPE_FILE_SERVICES.

74  : string
75  {
77  }

◆ hasUserPermissionTo()

ilObjFileServicesGUI::hasUserPermissionTo ( string  $str)
protected

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

References ILIAS\Repository\access().

Referenced by checkPermissionOrFail(), and initSettingsForm().

89  : bool
90  {
91  return $this->access->checkAccess($str, '', $this->ref_id);
92  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSettingsForm()

ilObjFileServicesGUI::initSettingsForm ( )
private

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

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

Referenced by editSettings(), and saveSettings().

198  {
199  $permission_to_write = $this->hasUserPermissionTo('write');
200 
201  $form = new ilPropertyFormGUI();
202  $form->setFormAction($this->ctrl->getFormAction($this));
203  $form->setTitle($this->lng->txt(self::TAB_SETTINGS));
204 
205  // default positive list
206  $ne = new ilNonEditableValueGUI($this->lng->txt("file_suffix_default_positive"), "");
207  $ne->setValue(implode(", ", $this->file_service_settings->getDefaultWhitelist()));
208  $ne->setInfo($this->lng->txt("file_suffix_default_positive_info"));
209  $form->addItem($ne);
210 
211  // file suffix custom negative list
212  $ta = new ilTextAreaInputGUI(
213  $this->lng->txt(
214  "file_suffix_custom_negative"
215  ),
216  "suffix_repl_additional"
217  );
218  $ta->setInfo($this->lng->txt("file_suffix_custom_negative_info"));
219  $ta->setRows(5);
220  $ta->setDisabled(!$permission_to_write);
221  $form->addItem($ta);
222 
223  // file suffix custom positive list
224  $ta = new ilTextAreaInputGUI(
225  $this->lng->txt(
226  "file_suffix_custom_positive"
227  ),
228  "suffix_custom_white_list"
229  );
230  $ta->setInfo($this->lng->txt("file_suffix_custom_positive_info"));
231  $ta->setRows(5);
232  $ta->setDisabled(!$permission_to_write);
233  $form->addItem($ta);
234 
235  // resulting overall positive list
236  $ne = new ilNonEditableValueGUI($this->lng->txt("file_suffix_overall_positive"), "");
237  $ne->setValue(implode(", ", $this->file_service_settings->getWhiteListedSuffixes()));
238  $ne->setInfo($this->lng->txt("file_suffix_overall_positive_info"));
239  $form->addItem($ne);
240 
241  // explicit negative list
242  $ta = new ilTextAreaInputGUI(
243  $this->lng->txt("file_suffix_custom_expl_negative"),
244  "suffix_custom_expl_black"
245  );
246  $ta->setInfo($this->lng->txt("file_suffix_custom_expl_negative_info"));
247  $ta->setRows(5);
248  $ta->setDisabled(!$permission_to_write);
249  $form->addItem($ta);
250 
251  // command buttons
252  if ($permission_to_write) {
253  $form->addCommandButton('saveSettings', $this->lng->txt('save'));
254  $form->addCommandButton('view', $this->lng->txt('cancel'));
255  }
256 
257  return $form;
258  }
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveSettings()

ilObjFileServicesGUI::saveSettings ( )
protected

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

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

280  : void
281  {
282  $this->checkPermissionOrFail("write");
283 
284  // get form
285  $form = $this->initSettingsForm();
286  if ($form->checkInput()) {
287  $trafo = (fn(string $id): ?string => $this->http->post()->has($id)
288  ? $this->http->post()->retrieve($id, $this->refinery->to()->string())
289  : null);
290 
291 
292  $this->settings->set("suffix_repl_additional", $trafo("suffix_repl_additional"));
293  $this->settings->set("suffix_custom_white_list", $trafo("suffix_custom_white_list"));
294  $this->settings->set("suffix_custom_expl_black", $trafo("suffix_custom_expl_black"));
295 
296  $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
297  $this->ctrl->redirect($this, self::CMD_EDIT_SETTINGS);
298  } else {
299  $form->setValuesByPost();
300  $this->tpl->setContent($form->getHTML());
301  }
302  }
has(string $class_name)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.
to(\GdImage $image, ?int $quality=null)
Currently this is the only way to make a FileStream from a GD image resource.
+ Here is the call graph for this function:

◆ setTitleAndDescription()

ilObjFileServicesGUI::setTitleAndDescription ( )

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

References ILIAS\Repository\object().

191  : void
192  {
193  parent::setTitleAndDescription();
194  $this->tpl->setDescription($this->object->getDescription());
195  }
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilObjFileServicesGUI::$ctrl
protected

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

◆ $error_handling

ilErrorHandling ilObjFileServicesGUI::$error_handling

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

◆ $file_service_settings

ilFileServicesSettings ilObjFileServicesGUI::$file_service_settings
protected

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

◆ $http

WrapperFactory ilObjFileServicesGUI::$http
protected

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

◆ $lng

ilLanguage ilObjFileServicesGUI::$lng

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

◆ $refinery

Factory ilObjFileServicesGUI::$refinery
protected

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

◆ $settings

ilSetting ilObjFileServicesGUI::$settings
protected

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

◆ $tabs

ilTabsGUI ilObjFileServicesGUI::$tabs
protected

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

◆ $tpl

ilGlobalTemplateInterface ilObjFileServicesGUI::$tpl

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

◆ CMD_EDIT_SETTINGS

const ilObjFileServicesGUI::CMD_EDIT_SETTINGS = 'editSettings'

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

◆ 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.


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