ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
RepositoryObject.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
27
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}
This describes commonalities between all types of Dropdowns.
Definition: Dropdown.php:35
This describes how an icon could be modified during construction of UI.
Definition: Icon.php:29
withSize(string $size)
Set the size for this icon.