ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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 
33  public function init(ResourceStakeholder $stakeholder, int $user_id): void
34  {
35  $this->user_id = $user_id;
36  $this->setOwner($user_id);
37  $this->stakeholder = $stakeholder;
38  }
39 
40  public function getId(): string
41  {
42  return $this->stakeholder->getId();
43  }
44 
45  public function getOwnerOfNewResources(): int
46  {
47  return $this->user_id ?? $this->stakeholder->getOwnerOfNewResources();
48  }
49 
50  public function getFullyQualifiedClassName(): string
51  {
52  return $this->stakeholder->getFullyQualifiedClassName();
53  }
54 
55  public function isResourceInUse(ResourceIdentification $identification): bool
56  {
57  return $this->stakeholder->isResourceInUse($identification);
58  }
59 
60  public function canBeAccessedByCurrentUser(ResourceIdentification $identification): bool
61  {
62  return $this->stakeholder->canBeAccessedByCurrentUser($identification);
63  }
64 
65  public function resourceHasBeenDeleted(ResourceIdentification $identification): bool
66  {
67  return $this->stakeholder->resourceHasBeenDeleted($identification);
68  }
69 
70  public function getOwnerOfResource(ResourceIdentification $identification): int
71  {
72  return $this->stakeholder->getOwnerOfResource($identification);
73  }
74 
75  public function getConsumerNameForPresentation(): string
76  {
77  return $this->stakeholder->getConsumerNameForPresentation();
78  }
79 
80  public function getLocationURIForResourceUsage(ResourceIdentification $identification): ?string
81  {
82  return $this->stakeholder->getLocationURIForResourceUsage($identification);
83  }
84 
85 }
getLocationURIForResourceUsage(ResourceIdentification $identification)
getOwnerOfResource(ResourceIdentification $identification)
init(ResourceStakeholder $stakeholder, int $user_id)
resourceHasBeenDeleted(ResourceIdentification $identification)
canBeAccessedByCurrentUser(ResourceIdentification $identification)
isResourceInUse(ResourceIdentification $identification)