ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
Configuration.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25
29final class Configuration
30{
31 public function __construct(
32 private ResourceCollection $collection,
33 private ResourceStakeholder $stakeholder,
34 private string $title,
35 private Mode $mode = Mode::DATA_TABLE,
36 private int $items_per_page = 100,
37 private bool $user_can_upload = false,
38 private bool $user_can_administrate = false,
39 private bool $append_duplicate_filenames_as_revision = false
40 ) {
41 }
42
44 {
45 return $this->collection;
46 }
47
49 {
50 return $this->stakeholder;
51 }
52
53 public function getTitle(): string
54 {
55 return $this->title;
56 }
57
58 public function getDescription(): ?string
59 {
60 return null;
61 }
62
63 public function getItemsPerPage(): int
64 {
65 return $this->items_per_page;
66 }
67
68 public function getMode(): Mode
69 {
70 return $this->mode;
71 }
72
73 public function canUserUpload(): bool
74 {
75 return $this->user_can_upload;
76 }
77
78 public function canUserAdministrate(): bool
79 {
80 return $this->user_can_administrate;
81 }
82
83 public function preventDuplicates(): bool
84 {
85 return $this->append_duplicate_filenames_as_revision;
86 }
87}
__construct(private ResourceCollection $collection, private ResourceStakeholder $stakeholder, private string $title, private Mode $mode=Mode::DATA_TABLE, private int $items_per_page=100, private bool $user_can_upload=false, private bool $user_can_administrate=false, private bool $append_duplicate_filenames_as_revision=false)