ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilUserProfilePictureDefinition Class Reference
+ Inheritance diagram for ilUserProfilePictureDefinition:
+ Collaboration diagram for ilUserProfilePictureDefinition:

Public Member Functions

array __construct ()
 
 getId ()
 
 getFlavourMachineId ()
 Defines the ID of the machine that supports this definition. More...
 
 getInternalName ()
 This defines the speaky internal name of the definition, as the consumer would like to use it, e.g. More...
 
 getVariantName ()
 If a definition can be used in several variants (e.g. More...
 
 persist ()
 Define whether the generated flavor and the respective streams should be persisted, or whether they should only be generated and used in-memory. More...
 
 getSizes ()
 
 getQuality ()
 

Private Attributes

const ID = '90ffcb9513daf30de2f5b5de82d7edee162f5dbc9fd16713810cf75326849dc2'
 
int $quality = 50
 
array $sizes
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

array ilUserProfilePictureDefinition::__construct ( )

Definition at line 39 of file class.ilUserProfilePictureDefinition.php.

40  {
41  }

Member Function Documentation

◆ getFlavourMachineId()

ilUserProfilePictureDefinition::getFlavourMachineId ( )

Defines the ID of the machine that supports this definition.

The machine MUST exist.

Implements ILIAS\ResourceStorage\Flavour\Definition\FlavourDefinition.

Definition at line 48 of file class.ilUserProfilePictureDefinition.php.

References ilUserProfilePictureMachine\ID.

◆ getId()

ilUserProfilePictureDefinition::getId ( )
Returns
string max. 64 characters, MUST be unique and NOT a class-related magic-constant. E.g. you can generate a random one with $ php -r"echo hash('sha256', uniqid());" | pbcopy in your shell and paste string in your getId() implementation.

If you ever change the ID, existing - maybe persisted - flavours created based on this definition will not be found anymore and have to be regenerated.

Implements ILIAS\ResourceStorage\Flavour\Definition\FlavourDefinition.

Definition at line 43 of file class.ilUserProfilePictureDefinition.php.

43  : string
44  {
45  return self::ID;
46  }

◆ getInternalName()

ilUserProfilePictureDefinition::getInternalName ( )

This defines the speaky internal name of the definition, as the consumer would like to use it, e.g.

to be able to distinguish between several flavors.

Implements ILIAS\ResourceStorage\Flavour\Definition\FlavourDefinition.

Definition at line 53 of file class.ilUserProfilePictureDefinition.php.

53  : string
54  {
55  return 'profile_picture';
56  }

◆ getQuality()

ilUserProfilePictureDefinition::getQuality ( )

Definition at line 76 of file class.ilUserProfilePictureDefinition.php.

References $quality.

76  : int
77  {
78  return $this->quality;
79  }

◆ getSizes()

ilUserProfilePictureDefinition::getSizes ( )

Definition at line 71 of file class.ilUserProfilePictureDefinition.php.

References $sizes.

71  : array
72  {
73  return $this->sizes;
74  }

◆ getVariantName()

ilUserProfilePictureDefinition::getVariantName ( )

If a definition can be used in several variants (e.g.

configurable size of a thumbnail), such variants must be distinguishable. For example, a variant name may contain "{height}x{width}" if these are configurable values.

The Variant-Name MUST be less than 768 characters long!

Implements ILIAS\ResourceStorage\Flavour\Definition\FlavourDefinition.

Definition at line 58 of file class.ilUserProfilePictureDefinition.php.

58  : ?string
59  {
60  return json_encode([
61  'quality' => $this->quality,
62  'sizes' => $this->sizes
63  ]);
64  }

◆ persist()

ilUserProfilePictureDefinition::persist ( )

Define whether the generated flavor and the respective streams should be persisted, or whether they should only be generated and used in-memory.

Implements ILIAS\ResourceStorage\Flavour\Definition\FlavourDefinition.

Definition at line 66 of file class.ilUserProfilePictureDefinition.php.

66  : bool
67  {
68  return true;
69  }

Field Documentation

◆ $quality

int ilUserProfilePictureDefinition::$quality = 50
private

Definition at line 30 of file class.ilUserProfilePictureDefinition.php.

Referenced by getQuality().

◆ $sizes

array ilUserProfilePictureDefinition::$sizes
private
Initial value:
= [
'big' => 512

Definition at line 32 of file class.ilUserProfilePictureDefinition.php.

Referenced by getSizes().

◆ ID

const ilUserProfilePictureDefinition::ID = '90ffcb9513daf30de2f5b5de82d7edee162f5dbc9fd16713810cf75326849dc2'
private

Definition at line 28 of file class.ilUserProfilePictureDefinition.php.


The documentation for this class was generated from the following file: