ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\LegalDocuments\DefaultMappings Class Reference
+ Collaboration diagram for ILIAS\LegalDocuments\DefaultMappings:

Public Member Functions

 __construct (private readonly string $id, private readonly Container $container)
 
 conditionDefinitions ()
 
 contentAsComponent ()
 

Detailed Description

Definition at line 32 of file DefaultMappings.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LegalDocuments\DefaultMappings::__construct ( private readonly string  $id,
private readonly Container  $container 
)

Definition at line 34 of file DefaultMappings.php.

37  {
38  }

Member Function Documentation

◆ conditionDefinitions()

ILIAS\LegalDocuments\DefaultMappings::conditionDefinitions ( )
Returns
SelectionMap<ConditionDefinition>

Definition at line 43 of file DefaultMappings.php.

References null.

43  : SelectionMap
44  {
45  $ui = new UI(
46  $this->id,
47  $this->container->ui(),
48  $this->container->language()
49  );
50 
51  $this->container->language()->loadLanguageModule('rbac');
52  $this->container->language()->loadLanguageModule('meta');
53 
54  $required = fn(array $options): Constraint => $this->container->refinery()->custom()->constraint(
55  static fn(?string $s): bool => $s !== null && isset($options[$s]),
56  static fn(): string => $ui->txt('msg_input_is_required')
57  );
58 
59  return new SelectionMap([
60  'usr_global_role' => new RoleDefinition($ui, $this->container['ilObjDataCache'], $this->container->rbac()->review(), $required),
61  'usr_language' => new UserLanguageDefinition($ui, $this->container->language()->getInstalledLanguages(), $required),
62  'usr_country' => new UserCountryDefinition($ui, $required),
63  ], 'usr_country');
64  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
custom()
expected output: > ILIAS shows a base horizontal bar chart but customized with e.g.
Definition: custom.php:33

◆ contentAsComponent()

ILIAS\LegalDocuments\DefaultMappings::contentAsComponent ( )
Returns
array<string|int, callable(DocumentContent): Component>

Definition at line 69 of file DefaultMappings.php.

69  : array
70  {
71  return [
72  'html' => fn($x) => $this->container->ui()->factory()->legacy()->content($x->value()),
73  ];
74  }

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