ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Mode.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24use ILIAS\UI\Implementation\Component\ComponentHelper;
25
26class Mode implements C\ViewControl\Mode
27{
28 use ComponentHelper;
29
30 protected array $labeled_actions;
31 protected string $aria_label;
32 protected ?string $active = null;
33
34 public function __construct($labelled_actions, string $aria_label)
35 {
36 $this->labeled_actions = $this->toArray($labelled_actions);
37 $this->aria_label = $aria_label;
38 }
39
40 public function withActive(string $label): C\ViewControl\Mode
41 {
42 $clone = clone $this;
43 $clone->active = $label;
44 return $clone;
45 }
46
47 public function getActive(): ?string
48 {
49 return $this->active;
50 }
51
52 public function getLabelledActions(): array
53 {
55 }
56
57 public function getAriaLabel(): string
58 {
59 return $this->aria_label;
60 }
61}
__construct($labelled_actions, string $aria_label)
Definition: Mode.php:34