ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
RepositoryObject.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
27 
28 class RepositoryObject extends Card implements C\RepositoryObject
29 {
30  protected ?Icon $object_icon = null;
32  protected ?bool $certificate = null;
33  protected ?Dropdown $actions = null;
34 
35  public function withObjectIcon(Icon $icon): C\RepositoryObject
36  {
37  $icon = $icon->withSize("medium"); // ensure same size
38  $clone = clone $this;
39  $clone->object_icon = $icon;
40  return $clone;
41  }
42 
43  public function getObjectIcon(): ?Icon
44  {
45  return $this->object_icon;
46  }
47 
48  public function withProgress(ProgressMeter $progress_meter): C\RepositoryObject
49  {
50  $clone = clone $this;
51  $clone->progress = $progress_meter;
52  return $clone;
53  }
54 
58  public function getProgress(): ?ProgressMeter
59  {
60  return $this->progress;
61  }
62 
63  public function withCertificateIcon(bool $certificate_icon): C\RepositoryObject
64  {
65  $clone = clone $this;
66  $clone->certificate = $certificate_icon;
67  return $clone;
68  }
69 
70  public function getCertificateIcon(): ?bool
71  {
72  return $this->certificate;
73  }
74 
75  public function withActions(Dropdown $dropdown): C\RepositoryObject
76  {
77  $clone = clone $this;
78  $clone->actions = $dropdown;
79  return $clone;
80  }
81 
82  public function getActions(): ?Dropdown
83  {
84  return $this->actions;
85  }
86 }
withSize(string $size)
Set the size for this icon.
This describes commonalities between all types of Dropdowns.
Definition: Dropdown.php:34
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null