ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilUserProfilePictureDefinition.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
27{
28 private const ID = '90ffcb9513daf30de2f5b5de82d7edee162f5dbc9fd16713810cf75326849dc2';
29
30 private int $quality = 50;
31
32 private array $sizes = [
33 'big' => 512,
34 'small' => 100,
35 'xsmall' => 75,
36 'xxsmall' => 30
37 ];
38
39 public function __construct(
40 ) {
41 }
42
43 public function getId(): string
44 {
45 return self::ID;
46 }
47
48 public function getFlavourMachineId(): string
49 {
51 }
52
53 public function getInternalName(): string
54 {
55 return 'profile_picture';
56 }
57
58 public function getVariantName(): ?string
59 {
60 return json_encode([
61 'quality' => $this->quality,
62 'sizes' => $this->sizes
63 ]);
64 }
65
66 public function persist(): bool
67 {
68 return true;
69 }
70
71 public function getSizes(): array
72 {
73 return $this->sizes;
74 }
75
76 public function getQuality(): int
77 {
78 return $this->quality;
79 }
80}
persist()
Define whether the generated flavor and the respective streams should be persisted,...
getFlavourMachineId()
Defines the ID of the machine that supports this definition.
getVariantName()
If a definition can be used in several variants (e.g.
getInternalName()
This defines the speaky internal name of the definition, as the consumer would like to use it,...