ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
RepositoryObject.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 
27 
28 class RepositoryObject extends Card implements C\RepositoryObject
29 {
30  protected ?Icon $object_icon = null;
31  protected ?ProgressMeter $progress = 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 how an icon could be modified during construction of UI.
Definition: Icon.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This describes commonalities between all types of Dropdowns.
Definition: Dropdown.php:34
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Card.php:21
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Card.php:21