ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 $tile_image_identification;
31  private readonly ?string $backgroundImagePath;
32  private readonly ?string $tile_image_path;
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 $tile_image_path = null,
50  ?string $backgroundImageIdentification = null,
51  ?string $tile_image_identification = null,
52  private ?int $id = null
53  ) {
54  $this->validUntil = (int) $validUntil;
55  $this->backgroundImagePath = (string) $backgroundImagePath;
56  $this->tile_image_path = (string) $tile_image_path;
57  $this->backgroundImageIdentification = (string) $backgroundImageIdentification;
58  $this->tile_image_identification = (string) $tile_image_identification;
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 getTileImagePath(): string
161  {
162  return $this->tile_image_path;
163  }
164 
165  public function getTileImageIdentification(): string
166  {
168  }
169 
170  public function getCurrentTileImageUsed(): string
171  {
172  if ($this->getTileImageIdentification() === '' || $this->getTileImageIdentification() === '-') {
173  return $this->getTileImagePath();
174  }
175  return $this->getTileImageIdentification();
176  }
177 
178  public function getCertificateId(): CertificateId
179  {
180  return $this->certificate_id;
181  }
182 }
readonly string $tile_image_identification
__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 $tile_image_path=null, ?string $backgroundImageIdentification=null, ?string $tile_image_identification=null, private ?int $id=null)
$version
Definition: plugin.php:24
readonly string $backgroundImagePath
readonly string $tile_image_path
$objId
Definition: xapitoken.php:57
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
readonly string $backgroundImageIdentification