ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
class.ilFileVersionsGUI.php
Go to the documentation of this file.
1<?php
2
29use ILIAS\Refinery\Factory as Refinery;
38use ILIAS\File\Versions\Table\Table as VersionsTable;
40
46{
48
49 public const KEY_FILE_RID = 'file_rid';
50 public const KEY_FILE_EXTRACT = 'file_extract';
51 public const KEY_FILE_STRUCTURE = 'file_structure';
52 public const KEY_COPYRIGHT_OPTION = "copyright_option";
53 public const KEY_INHERIT_COPYRIGHT = "inherit_copyright";
54 public const KEY_SELECT_COPYRIGHT = "select_copyright";
55 public const KEY_COPYRIGHT_ID = "copyright_id";
56
57 public const CMD_DEFAULT = 'index';
58 public const CMD_ROLLBACK_VERSION = "rollbackVersion";
59 public const CMD_DOWNLOAD_VERSION = "sendFile";
60 public const HIST_ID = 'hist_id';
61 public const CMD_CANCEL_DELETE = "cancelDeleteFile";
62 public const CMD_CONFIRMED_DELETE_FILE = "confirmDeleteFile";
63 public const CMD_CONFIRMED_DELETE_VERSIONS = 'confirmDeleteVersions';
64 public const CMD_ADD_NEW_VERSION = 'addNewVersion';
65 public const CMD_CREATE_NEW_VERSION = 'saveVersion';
66 public const CMD_ADD_REPLACING_VERSION = 'addReplacingVersion';
67 public const CMD_CREATE_REPLACING_VERSION = 'createReplacingVersion';
68 public const CMD_UNZIP_CURRENT_REVISION = Capabilities::UNZIP->value;
69 public const CMD_PROCESS_UNZIP = 'processUnzip';
70 public const CMD_RENDER_DELETE_SELECTED_VERSIONS_MODAL = 'renderDeleteSelectedVersionsModal';
71 public const CMD_PUBLISH = 'publish';
72 public const CMD_UNPUBLISH = 'unpublish';
73
75 private ?VersionsTable $table = null;
76 private \ILIAS\ResourceStorage\Services $storage;
79 protected UIServices $ui;
81 private \ilWorkspaceAccessHandler $wsp_access;
82 private int $ref_id;
83 protected ilLanguage $lng;
84 private Services $http;
86 protected ilCtrl $ctrl;
90 protected ?int $version_id = null;
91 protected ilTree $tree;
92 protected int $parent_id;
93 protected Refinery $refinery;
94 protected LOMServices $lom_services;
95
99 public function __construct(
100 private ilObjFile $file,
101 private CapabilityCollection $capabilities
102 ) {
103 global $DIC;
104 $this->ctrl = $DIC->ctrl();
105 $this->tpl = $DIC->ui()->mainTemplate();
106 $this->tabs = $DIC->tabs();
107 $this->http = $DIC->http();
108 $this->lng = $DIC->language();
109 $this->ref_id = $this->http->wrapper()->query()->retrieve('ref_id', $DIC->refinery()->kindlyTo()->int());
110 $this->toolbar = $DIC->toolbar();
111 $this->access = $DIC->access();
112 $this->storage = $DIC->resourceStorage();
113 $this->file_service_settings = $DIC->fileServiceSettings();
114 $this->ui = $DIC->ui();
115 $this->tree = $this->isWorkspaceContext() ? new ilWorkspaceTree($DIC->user()->getId()) : $DIC->repositoryTree();
116 $this->file_component_builder = new ilObjFileComponentBuilder($this->lng, $this->ui);
117 $this->refinery = $DIC->refinery();
118 $this->lom_services = $DIC->learningObjectMetadata();
119
120 $this->parent_id = $this->tree->getParentId($this->file->getRefId()) ?? $this->getParentIdType();
121 $this->wsp_access = new ilWorkspaceAccessHandler($this->tree);
122 $this->version_id = $this->http->wrapper()->query()->has(self::HIST_ID)
123 ? $this->http->wrapper()->query()->retrieve(self::HIST_ID, $DIC->refinery()->kindlyTo()->int())
124 : null;
125 $this->action_repo = new ActionDBRepository($DIC->database());
126 $this->current_revision = $this->getCurrentFileRevision();
127 }
128
129
130
135 protected function performCommand(): void
136 {
137 match ($this->ctrl->getCmd(self::CMD_DEFAULT)) {
138 self::CMD_DEFAULT => $this->index(),
139 self::CMD_DOWNLOAD_VERSION => $this->downloadVersion(),
140 self::CMD_ROLLBACK_VERSION => $this->rollbackVersion(),
141 self::CMD_ADD_NEW_VERSION => $this->addVersion(ilFileVersionFormGUI::MODE_ADD),
142 self::CMD_ADD_REPLACING_VERSION => $this->addVersion(ilFileVersionFormGUI::MODE_REPLACE),
143 self::CMD_CREATE_NEW_VERSION => $this->saveVersion(ilFileVersionFormGUI::MODE_ADD),
144 self::CMD_CREATE_REPLACING_VERSION => $this->saveVersion(ilFileVersionFormGUI::MODE_REPLACE),
145 self::CMD_CONFIRMED_DELETE_VERSIONS => $this->confirmDeleteVersions(),
146 self::CMD_CONFIRMED_DELETE_FILE => $this->confirmDeleteFile(),
147 self::CMD_UNZIP_CURRENT_REVISION => $this->unzipCurrentRevision(),
148 self::CMD_PROCESS_UNZIP => $this->processUnzip(),
149 self::CMD_RENDER_DELETE_SELECTED_VERSIONS_MODAL => $this->renderDeleteSelectedVersionsModal(),
150 self::CMD_PUBLISH => $this->publish(),
151 self::CMD_UNPUBLISH => $this->unpublish()
152 };
153 }
154
158 protected function setBackTab(): void
159 {
160 $this->tabs->clearTargets();
161 $this->tabs->setBackTarget(
162 $this->lng->txt('back'),
163 $this->ctrl->getLinkTarget($this, self::CMD_DEFAULT)
164 );
165 }
166
167 public function executeCommand(): void
168 {
169 // bugfix mantis 26007: use new function hasPermission to ensure that the check also works for workspace files
170 if (!$this->hasPermission('write')) {
171 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
172 $this->ctrl->returnToParent($this);
173 }
174 switch ($this->ctrl->getNextClass()) {
175 case strtolower(ilFileVersionsUploadHandlerGUI::class):
176 $this->ctrl->forwardCommand(
178 $this->file
179 )
180 );
181 return;
182 case strtolower(ilWOPIEmbeddedApplicationGUI::class):
183 $action = $this->action_repo->getEditActionForSuffix(
184 $this->current_revision->getInformation()->getSuffix()
185 );
186
187 // select best of the following
188 $cap = $this->capabilities->getBestOf(
189 Capabilities::MANAGE_VERSIONS,
190 Capabilities::VIEW_EXTERNAL,
191 Capabilities::INFO_PAGE
192 );
193 $goto_link = $cap->getUri();
194
195 $embeded_application = new EmbeddedApplication(
196 $this->current_revision->getIdentification(),
197 $action,
199 $goto_link,
200 false,
201 $this->lng->getLangKey()
202 );
203
204 $this->ctrl->forwardCommand(
206 $embeded_application
207 )
208 );
209 break;
210 default:
211 $this->performCommand();
212 break;
213 }
214 }
215
216 private function unzipCurrentRevision(): void
217 {
218 $this->setBackTab();
219 $this->tpl->setContent(
220 $this->ui->renderer()->render(
221 $this->getFileZipOptionsForm()
222 )
223 );
224 }
225
226 private function publish(): void
227 {
228 $this->file->enableNotification();
229 $this->storage->manage()->publish($this->getIdentification());
230 $this->file->updateObjectFromCurrentRevision();
231 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
232 $this->ctrl->redirect($this, self::CMD_DEFAULT);
233 }
234
235 private function unpublish(): void
236 {
237 $this->file->enableNotification();
238 if ($this->current_revision->getVersionNumber() === 1) {
239 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_cant_unpublish'), true);
240 $this->ctrl->redirect($this, self::CMD_DEFAULT);
241 }
242
243 $this->storage->manage()->unpublish($this->getIdentification());
244 $this->file->updateObjectFromCurrentRevision();
245 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
246 $this->ctrl->redirect($this, self::CMD_DEFAULT);
247 }
248
249 private function processUnzip(): void
250 {
251 $form = $this->getFileZipOptionsForm()->withRequest($this->http->request());
252 $data = $form->getData();
253
254 if (!empty($data)) {
255 $file_rid = $this->storage->manage()->find($data[self::KEY_FILE_RID]);
256 if (null !== $file_rid) {
257 $copyright_id = $data[self::KEY_COPYRIGHT_OPTION][1][self::KEY_COPYRIGHT_ID] ?? null;
258 $processor = $this->getFileProcessor($data[self::KEY_FILE_STRUCTURE]);
259 $processor->process($file_rid, null, null, $copyright_id);
260
261 if ($processor->getInvalidFileNames() !== []) {
262 $this->ui->mainTemplate()->setOnScreenMessage(
263 'info',
264 sprintf(
265 $this->lng->txt('file_upload_info_file_with_critical_extension'),
266 implode(', ', $processor->getInvalidFileNames())
267 ),
268 true
269 );
270 }
271
272 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_unzip_success'), true);
273 $this->ctrl->setParameterByClass(ilRepositoryGUI::class, "ref_id", $this->parent_id);
274 $this->ctrl->redirectByClass(ilRepositoryGUI::class);
275 }
276
277 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('file_not_found'));
278 }
279
280 $this->tpl->setContent(
281 $this->ui->renderer()->render(
282 $this->getFileZipOptionsForm()
283 )
284 );
285 }
286
287 private function index(): void
288 {
289 // Buttons
290 $status = $this->current_revision?->getStatus();
291
292 $btn_add_version = $this->ui->factory()->button()->standard(
293 $this->lng->txt('file_new_version'),
294 $this->ctrl->getLinkTarget($this, self::CMD_ADD_NEW_VERSION)
295 );
296 if ($status === RevisionStatus::DRAFT) {
297 $btn_add_version = $btn_add_version->withUnavailableAction();
298 }
299 $this->toolbar->addComponent($btn_add_version);
300
301 $btn_replace_version = $this->ui->factory()->button()->standard(
302 $this->lng->txt('replace_file'),
303 $this->ctrl->getLinkTarget($this, self::CMD_ADD_REPLACING_VERSION)
304 );
305 if ($status === RevisionStatus::DRAFT) {
306 $btn_replace_version = $btn_replace_version->withUnavailableAction();
307 }
308 $this->toolbar->addComponent($btn_replace_version);
309
310 // only add unzip button if the current revision is a zip.
311 if (null !== $this->current_revision &&
312 in_array($this->current_revision->getInformation()->getMimeType(), [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED], true)
313 ) {
314 $btn_unzip = $this->ui->factory()->button()->standard(
315 $this->lng->txt('unzip'),
316 $this->ctrl->getLinkTarget($this, self::CMD_UNZIP_CURRENT_REVISION)
317 );
318 $this->toolbar->addComponent($btn_unzip);
319 }
320
321 // Editor
322 $this->current_revision?->getInformation()?->getSuffix();
323
324 if ($this->action_repo->hasEditActionForSuffix(
325 $this->current_revision->getInformation()->getSuffix()
326 )) {
327 $external_editor = $this->ui->factory()
328 ->button()
329 ->standard(
330 $this->lng->txt('open_external_editor'),
331 $this->ctrl->getLinkTargetByClass(
332 [self::class, ilWOPIEmbeddedApplicationGUI::class],
334 )
335 );
336 $this->toolbar->addComponent($external_editor);
337 }
338
339
340 // Publish
341 if ($status === RevisionStatus::DRAFT) {
342 $this->tpl->setOnScreenMessage('info', $this->lng->txt('file_version_draft_info'));
343
344 $btn_publish = $this->ui->factory()->button()->standard(
345 $this->lng->txt('file_publish'),
346 $this->ctrl->getLinkTarget($this, self::CMD_PUBLISH)
347 );
348 $this->toolbar->addComponent($btn_publish);
349 }
350
351 $this->tpl->setContent($this->getTable()->getHTML());
352 }
353
354 private function addVersion(int $mode = ilFileVersionFormGUI::MODE_ADD): void
355 {
356 $this->setBackTab();
357
358 $form = new ilFileVersionFormGUI($this, $mode);
359 $this->tpl->setContent($form->getHTML());
360 }
361
366 private function saveVersion(int $mode = ilFileVersionFormGUI::MODE_ADD): void
367 {
368 $form = new ilFileVersionFormGUI($this, $mode);
369 if ($form->saveObject()) {
370 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
371 $this->ctrl->redirect($this, self::CMD_DEFAULT);
372 }
373 $this->tpl->setContent($form->getHTML());
374 }
375
376 private function downloadVersion(): void
377 {
378 try {
379 $this->file->sendFile($this->version_id);
380 } catch (FileNotFoundException) {
381 }
382 }
383
384 private function rollbackVersion(): void
385 {
386 $version_ids = $this->getVersionIdsFromRequest();
387
388 // more than one entry selected?
389 if (count($version_ids) !== 1) {
390 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("file_rollback_select_exact_one"), true);
391 $this->ctrl->redirect($this, self::CMD_DEFAULT);
392 }
393
394 if ($this->current_revision->getStatus() === RevisionStatus::DRAFT) {
395 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("file_rollback_rollback_first"), true);
396 $this->ctrl->redirect($this, self::CMD_DEFAULT);
397 }
398
399 // rollback the version
400 $version_id = $version_ids[0];
401 if ($version_id === $this->current_revision->getVersionNumber()) {
402 $this->tpl->setOnScreenMessage('info', $this->lng->txt("file_rollback_same_version"), true);
403 $this->ctrl->redirect($this, self::CMD_DEFAULT);
404 }
405
406 $this->file->rollback($version_id);
407
408 $this->tpl->setOnScreenMessage('success', sprintf($this->lng->txt("file_rollback_done"), (string) $version_id), true);
409 $this->ctrl->redirect($this, self::CMD_DEFAULT);
410 }
411
412 private function confirmDeleteVersions(): void
413 {
414 // delete versions after confirmation
415 $versions_to_delete = $this->getVersionIdsFromRequest();
416 if ($versions_to_delete !== []) {
417 $this->file->deleteVersions($versions_to_delete);
418 $this->tpl->setOnScreenMessage('success', $this->lng->txt("file_versions_deleted"), true);
419 }
420
421 $this->ctrl->setParameter($this, self::HIST_ID, "");
422 $this->ctrl->redirect($this, self::CMD_DEFAULT);
423 }
424
425 private function confirmDeleteFile(): void
426 {
427 $parent_id = $this->tree->getParentId($this->ref_id);
428
429 ilRepUtil::deleteObjects($parent_id, [$this->ref_id]);
430
431 // redirect to parent object
432 $this->ctrl->setParameterByClass(ilRepositoryGUI::class, "ref_id", $parent_id);
433 $this->ctrl->redirectByClass(ilRepositoryGUI::class);
434 }
435
436 public function getFile(): ilObjFile
437 {
438 return $this->file;
439 }
440
441 private function getTable(): VersionsTable
442 {
443 return $this->table ??= new VersionsTable($this);
444 }
445
446 private function getVersionIdsFromRequest(): array
447 {
448 $token_name = $this->getTable()->getIdToken()->getName();
449 $query_params = $this->http->request()->getQueryParams();
450
451 if (array_key_exists($token_name, $query_params)) {
452 $raw = $query_params[$token_name];
453 $values = is_array($raw) ? $raw : [$raw];
454 return array_values(array_map(static fn($v): int => (int) $v, $values));
455 }
456
458 if ($this->http->wrapper()->post()->has('interruptive_items')) {
459 return $this->http->wrapper()->post()->retrieve(
460 'interruptive_items',
461 $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int())
462 );
463 }
464
465 if ($this->http->wrapper()->query()->has(self::HIST_ID)) {
466 return [
467 $this->http->wrapper()->query()->retrieve(self::HIST_ID, $this->refinery->kindlyTo()->int()),
468 ];
469 }
470
471 return [];
472 }
473
479 private function hasPermission(string $a_permission): bool
480 {
481 // determine if the permission check concerns a workspace- or repository-object
482 if ($this->isWorkspaceContext()) {
483 // permission-check concerning a workspace object
484 if ($this->wsp_access->checkAccess($a_permission, "", $this->ref_id)) {
485 return true;
486 }
487 } elseif ($this->access->checkAccess($a_permission, '', $this->ref_id)) {
488 // permission-check concerning a repository object
489 return true;
490 }
491
492 return false;
493 }
494
495 protected function renderDeleteSelectedVersionsModal(): void
496 {
497 $delete_selected_versions_modal = $this->getDeleteSelectedVersionsModal();
498
499 $this->http->saveResponse(
500 $this->http->response()->withBody(
501 Streams::ofString(
502 (null !== $delete_selected_versions_modal) ?
503 $this->ui->renderer()->renderAsync([$delete_selected_versions_modal]) :
504 ''
505 )
506 )->withHeader('Content-Type', 'application/json; charset=utf-8')
507 );
508
509 $this->http->sendResponse();
510 $this->http->close();
511 }
512
514 {
515 $deletion_version_ids = $this->getVersionIdsFromRequest();
516 $existing_versions = $this->file->getVersions();
517
518 $non_deletion_versions = array_udiff(
519 $existing_versions,
520 $deletion_version_ids,
521 static function ($a, $b): int|float {
522 if ($a instanceof ilObjFileVersion) {
523 $a = $a->getHistEntryId();
524 }
525 if ($b instanceof ilObjFileVersion) {
526 $b = $b->getHistEntryId();
527 }
528 return $a - $b;
529 }
530 );
531 $this->checkSanityOfDeletionRequest($deletion_version_ids, false);
532
533 // no version will remain after deletion, so we can delete the whole file
534 if (count($non_deletion_versions) < 1) {
535 return $this->file_component_builder->buildConfirmDeleteAllVersionsModal(
536 $this->ctrl->getFormActionByClass(self::class, self::CMD_CONFIRMED_DELETE_FILE),
537 $this->file
538 );
539 }
540 // confirm the deletion of the selected versions
541 return $this->file_component_builder->buildConfirmDeleteSpecificVersionsModal(
542 $this->ctrl->getFormActionByClass(self::class, self::CMD_CONFIRMED_DELETE_VERSIONS),
543 $this->file,
544 $deletion_version_ids
545 );
546 }
547
548 protected function checkSanityOfDeletionRequest(array $requested_deletion_version, bool $redirect): void
549 {
550 // Check Sanity of request
551 // Cant delete version if current is a DRAFT
552 if (
553 $this->current_revision->getStatus() === RevisionStatus::DRAFT
554 ) {
555 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('publish_before_delete'), $redirect);
556 if ($redirect) {
557 $this->ctrl->redirect($this, self::CMD_DEFAULT);
558 }
559 }
560
561 // no checkbox has been selected
562 if (count($requested_deletion_version) < 1) {
563 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), $redirect);
564 if ($redirect) {
565 $this->ctrl->redirect($this, self::CMD_DEFAULT);
566 }
567 }
568 }
569
570 private function getFileZipOptionsForm(): Form
571 {
572 $inputs = [];
573 $copyright_options = [];
574 $form_action = $this->ctrl->getFormActionByClass(self::class, self::CMD_PROCESS_UNZIP);
575
576 $inputs[self::KEY_FILE_RID] = $this->ui->factory()->input()->field()->hidden()->withValue(
577 $this->file->getResourceId()
578 );
579 $inputs[self::KEY_FILE_STRUCTURE] = $this->ui->factory()->input()->field()->checkbox(
580 $this->lng->txt('take_over_structure'),
581 $this->lng->txt('take_over_structure_info'),
582 );
583
584 if (!$this->lom_services->copyrightHelper()->isCopyrightSelectionActive()) {
585 return $this->ui->factory()->input()->container()->form()->standard($form_action, $inputs);
586 }
587
588 $lom_reader = $this->lom_services->read($this->file->getId(), 0, $this->file->getType());
589 $lom_cp_helper = $this->lom_services->copyrightHelper();
590
591 if ($lom_cp_helper->hasPresetCopyright($lom_reader)) {
592 $zip_copyright = $lom_cp_helper->readPresetCopyright($lom_reader);
593 $zip_copyright_id = $zip_copyright->identifier();
594 $zip_copyright_title = $zip_copyright->title();
595 } else {
596 $zip_copyright_id = $zip_copyright_title = $lom_cp_helper->readCustomCopyright($lom_reader);
597 }
598 if ($zip_copyright_id !== '') {
599 $copyright_inheritance_input = $this->ui->factory()->input()->field()->hidden()->withValue(
600 $zip_copyright_id
601 );
602 $copyright_options[self::KEY_INHERIT_COPYRIGHT] = $this->ui->factory()->input()->field()->group(
603 [self::KEY_COPYRIGHT_ID => $copyright_inheritance_input],
604 $this->lng->txt("copyright_inherited"),
605 sprintf(
606 $this->lng->txt("copyright_inherited_info"),
607 $zip_copyright_title
608 )
609 );
610 }
611
612 $copyright_selection_input = $this->getCopyrightSelectionInput('set_license_for_all_files');
613 $copyright_options[self::KEY_SELECT_COPYRIGHT] = $this->ui->factory()->input()->field()->group(
614 [self::KEY_COPYRIGHT_ID => $copyright_selection_input],
615 $this->lng->txt("copyright_custom"),
616 $this->lng->txt("copyright_custom_info")
617 );
618
619 $inputs[self::KEY_COPYRIGHT_OPTION] = $this->ui->factory()->input()->field()->switchableGroup(
620 $copyright_options,
621 $this->lng->txt("md_copyright")
622 )->withValue(self::KEY_SELECT_COPYRIGHT);
623
624 return $this->ui->factory()->input()->container()->form()->standard($form_action, $inputs);
625 }
626
627 private function getFileProcessor(bool $keep_structure): ilObjFileProcessorInterface
628 {
629 $context = $this->getParentIdType();
630
631 if ($keep_structure) {
634 new ilObjFileGUI(
635 $this->file->getId(),
636 $context,
637 $this->parent_id
638 ),
639 $this->storage,
640 $this->file_service_settings,
641 $this->tree
642 );
643 }
644
647 new ilObjFileGUI(
648 $this->file->getId(),
649 $context,
650 $this->parent_id
651 ),
652 $this->storage,
653 $this->file_service_settings,
654 $this->tree
655 );
656 }
657
659 {
660 return $this->storage->manage()->find($this->file->getResourceId());
661 }
662
663 private function getCurrentFileRevision(): ?Revision
664 {
665 $file_rid = $this->getIdentification();
666 if (null !== $file_rid) {
667 return $this->storage->manage()->getCurrentRevisionIncludingDraft($file_rid);
668 }
669
670 return null;
671 }
672
673 private function getParentIdType(): int
674 {
675 return ($this->isWorkspaceContext()) ?
678 }
679
680 private function isWorkspaceContext(): bool
681 {
682 return $this->http->wrapper()->query()->has('wsp_id');
683 }
684
685 protected function getUIFactory(): ILIAS\UI\Factory
686 {
687 return $this->ui->factory();
688 }
689
690 protected function getLanguage(): \ilLanguage
691 {
692 return $this->lng;
693 }
694}
Provides fluid interface to RBAC services.
Definition: UIServices.php:25
Builds data types.
Definition: Factory.php:36
The scope of this class is split ilias-conform URI's into components.
Definition: URI.php:35
Mime type determination.
Definition: MimeType.php:30
Indicates that a file is missing or not found.
Stream factory which enables the user to create streams without the knowledge of the concrete class.
Definition: Streams.php:32
Class Services.
Definition: Services.php:38
Class ilCtrl provides processing control methods.
Class ilFileVersionFormGUI.
ActionRepository $action_repo
ILIAS ResourceStorage Services $storage
getFileProcessor(bool $keep_structure)
__construct(private ilObjFile $file, private CapabilityCollection $capabilities)
ilFileVersionsGUI constructor.
ilObjFileComponentBuilder $file_component_builder
ilGlobalTemplateInterface $tpl
checkSanityOfDeletionRequest(array $requested_deletion_version, bool $redirect)
saveVersion(int $mode=ilFileVersionFormGUI::MODE_ADD)
addVersion(int $mode=ilFileVersionFormGUI::MODE_ADD)
hasPermission(string $a_permission)
bugfix mantis 26007: this function was created to ensure that the access check not only works for rep...
ilFileServicesSettings $file_service_settings
ilWorkspaceAccessHandler $wsp_access
Class ilFileVersionsUploadHandlerGUI.
language handling
GUI class for file objects.
Class ilObjFileStakeholder.
Class ilObjFileUnzipFlatProcessor.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjFile.
static deleteObjects(int $a_cur_ref_id, array $a_ids)
Delete objects.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This describes commonalities between all forms.
Definition: Form.php:34
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
Interface ilObjFileProcessorInterface.
static http()
Fetches the global http state from ILIAS.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
global $DIC
Definition: shib_login.php:26
trait ilObjFileCopyrightInput