ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
SelectionMap.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\LegalDocuments;
22
27{
28 private readonly ?string $default_selection;
29
33 public function __construct(
34 private readonly array $conditions = [],
35 ?string $default_selection = null
36 ) {
37 $this->default_selection = $default_selection ?? key($this->conditions);
38 }
39
43 public function choices(): array
44 {
45 return $this->conditions;
46 }
47
48 public function defaultSelection(): ?string
49 {
51 }
52}
__construct(private readonly array $conditions=[], ?string $default_selection=null)