ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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  #[\Override]
51  public function getFullyQualifiedClassName(): string
52  {
53  return $this->stakeholder->getFullyQualifiedClassName();
54  }
55 
56  #[\Override]
57  public function isResourceInUse(ResourceIdentification $identification): bool
58  {
59  return $this->stakeholder->isResourceInUse($identification);
60  }
61 
62  #[\Override]
63  public function canBeAccessedByCurrentUser(ResourceIdentification $identification): bool
64  {
65  return $this->stakeholder->canBeAccessedByCurrentUser($identification);
66  }
67 
68  #[\Override]
69  public function resourceHasBeenDeleted(ResourceIdentification $identification): bool
70  {
71  return $this->stakeholder->resourceHasBeenDeleted($identification);
72  }
73 
74  #[\Override]
75  public function getOwnerOfResource(ResourceIdentification $identification): int
76  {
77  return $this->stakeholder->getOwnerOfResource($identification);
78  }
79 
80  #[\Override]
81  public function getConsumerNameForPresentation(): string
82  {
83  return $this->stakeholder->getConsumerNameForPresentation();
84  }
85 
86  public function getLocationURIForResourceUsage(ResourceIdentification $identification): ?string
87  {
88  return $this->stakeholder->getLocationURIForResourceUsage($identification);
89  }
90 
91 }
getLocationURIForResourceUsage(ResourceIdentification $identification)
getOwnerOfResource(ResourceIdentification $identification)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
init(ResourceStakeholder $stakeholder, int $user_id)
resourceHasBeenDeleted(ResourceIdentification $identification)
canBeAccessedByCurrentUser(ResourceIdentification $identification)
isResourceInUse(ResourceIdentification $identification)