ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
WOPIStakeholderWrapper.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 
28 {
29  private ?int $user_id = null;
31 
32  public function __construct()
33  {
34  }
35 
36  public function init(ResourceStakeholder $stakeholder, int $user_id): void
37  {
38  $this->user_id = $user_id;
39  $this->stakeholder = $stakeholder;
40  }
41 
42  public function getId(): string
43  {
44  return $this->stakeholder->getId();
45  }
46 
47  public function getOwnerOfNewResources(): int
48  {
49  return $this->user_id ?? $this->stakeholder->getOwnerOfNewResources();
50  }
51 
52  public function getFullyQualifiedClassName(): string
53  {
54  return $this->stakeholder->getFullyQualifiedClassName();
55  }
56 
57  public function isResourceInUse(ResourceIdentification $identification): bool
58  {
59  return $this->stakeholder->isResourceInUse($identification);
60  }
61 
62  public function canBeAccessedByCurrentUser(ResourceIdentification $identification): bool
63  {
64  return $this->stakeholder->canBeAccessedByCurrentUser($identification);
65  }
66 
67  public function resourceHasBeenDeleted(ResourceIdentification $identification): bool
68  {
69  return $this->stakeholder->resourceHasBeenDeleted($identification);
70  }
71 
72  public function getOwnerOfResource(ResourceIdentification $identification): int
73  {
74  return $this->stakeholder->getOwnerOfResource($identification);
75  }
76 
77  public function getConsumerNameForPresentation(): string
78  {
79  return $this->stakeholder->getConsumerNameForPresentation();
80  }
81 
82  public function getLocationURIForResourceUsage(ResourceIdentification $identification): ?string
83  {
84  return $this->stakeholder->getLocationURIForResourceUsage($identification);
85  }
86 
87 }
getOwnerOfResource(ResourceIdentification $identification)
__construct()
Constructor must not have any parameters.
getLocationURIForResourceUsage(ResourceIdentification $identification)
resourceHasBeenDeleted(ResourceIdentification $identification)
isResourceInUse(ResourceIdentification $identification)
canBeAccessedByCurrentUser(ResourceIdentification $identification)
init(ResourceStakeholder $stakeholder, int $user_id)