ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
Mode.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 
23 use ILIAS\UI\Component as C;
25 
26 class 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 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Factory.php:21
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct($labelled_actions, string $aria_label)
Definition: Mode.php:34