ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
class.ilUserCertificate.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
27 {
28  private readonly int $validUntil;
29  private readonly ?string $backgroundImageIdentification;
30  private readonly ?string $thumbnailImageIdentification;
31  private readonly ?string $backgroundImagePath;
32  private readonly ?string $thumbnailImagePath;
33 
34  public function __construct(
35  private readonly int $patternCertificateId,
36  private readonly int $objId,
37  private readonly string $objType,
38  private readonly int $userId,
39  private readonly string $userName,
40  private readonly int $acquiredTimestamp,
41  private readonly string $certificateContent,
42  private readonly string $templateValues,
43  ?int $validUntil,
44  private int $version,
45  private readonly string $iliasVersion,
46  private readonly bool $currentlyActive,
47  private readonly CertificateId $certificate_id,
48  ?string $backgroundImagePath = null,
49  ?string $thumbnailImagePath = null,
50  ?string $backgroundImageIdentification = null,
51  ?string $thumbnailImageIdentification = null,
52  private ?int $id = null
53  ) {
54  $this->validUntil = (int) $validUntil;
55  $this->backgroundImagePath = (string) $backgroundImagePath;
56  $this->thumbnailImagePath = (string) $thumbnailImagePath;
57  $this->backgroundImageIdentification = (string) $backgroundImageIdentification;
58  $this->thumbnailImageIdentification = (string) $thumbnailImageIdentification;
59  }
60 
61  public function withId(int $id): self
62  {
63  $clone = clone $this;
64  $clone->id = $id;
65 
66  return $clone;
67  }
68 
69  public function withVersion(int $version): self
70  {
71  $clone = clone $this;
72  $clone->version = $version;
73 
74  return $clone;
75  }
76 
77  public function getPatternCertificateId(): int
78  {
79  return $this->patternCertificateId;
80  }
81 
82  public function getObjId(): int
83  {
84  return $this->objId;
85  }
86 
87  public function getObjType(): string
88  {
89  return $this->objType;
90  }
91 
92  public function getUserId(): int
93  {
94  return $this->userId;
95  }
96 
97  public function getUserName(): string
98  {
99  return $this->userName;
100  }
101 
102  public function getAcquiredTimestamp(): int
103  {
104  return $this->acquiredTimestamp;
105  }
106 
107  public function getCertificateContent(): string
108  {
109  return $this->certificateContent;
110  }
111 
112  public function getTemplateValues(): string
113  {
114  return $this->templateValues;
115  }
116 
117  public function getValidUntil(): int
118  {
119  return $this->validUntil;
120  }
121 
122  public function getVersion(): int
123  {
124  return $this->version;
125  }
126 
127  public function getIliasVersion(): string
128  {
129  return $this->iliasVersion;
130  }
131 
132  public function isCurrentlyActive(): bool
133  {
134  return $this->currentlyActive;
135  }
136 
137  public function getId(): ?int
138  {
139  return $this->id;
140  }
141 
142  public function getBackgroundImagePath(): string
143  {
145  }
146 
147  public function getBackgroundImageIdentification(): string
148  {
150  }
151 
152  public function getCurrentBackgroundImageUsed(): string
153  {
154  if ($this->getBackgroundImageIdentification() === '' || $this->getBackgroundImageIdentification() === '-') {
155  return $this->getBackgroundImagePath();
156  }
157  return $this->getBackgroundImageIdentification();
158  }
159 
160  public function getThumbnailImagePath(): string
161  {
163  }
164 
165  public function getThumbnailImageIdentification(): string
166  {
168  }
169 
170  public function getCurrentThumbnailImageUsed(): string
171  {
172  if ($this->getThumbnailImageIdentification() === '' || $this->getThumbnailImageIdentification() === '-') {
173  return $this->getThumbnailImagePath();
174  }
175  return $this->getThumbnailImageIdentification();
176  }
177 
178  public function getCertificateId(): CertificateId
179  {
180  return $this->certificate_id;
181  }
182 }
$version
Definition: plugin.php:25
readonly string $backgroundImagePath
$objId
Definition: xapitoken.php:55
readonly string $thumbnailImageIdentification
readonly string $thumbnailImagePath
__construct(private readonly int $patternCertificateId, private readonly int $objId, private readonly string $objType, private readonly int $userId, private readonly string $userName, private readonly int $acquiredTimestamp, private readonly string $certificateContent, private readonly string $templateValues, ?int $validUntil, private int $version, private readonly string $iliasVersion, private readonly bool $currentlyActive, private readonly CertificateId $certificate_id, ?string $backgroundImagePath=null, ?string $thumbnailImagePath=null, ?string $backgroundImageIdentification=null, ?string $thumbnailImageIdentification=null, private ?int $id=null)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:24
readonly string $backgroundImageIdentification