ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Footer.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
30 use ILIAS\Data\URI;
31 
32 class Footer implements MainControls\Footer
33 {
34  use ComponentHelper;
35 
37  private array $modals = [];
38 
39  protected ?URI $permanent_url = null;
40 
42  protected array $link_groups = [];
43 
45  protected array $icons = [];
46 
48  protected array $links = [];
49 
51  protected array $texts = [];
52 
53  public function withAdditionalLinkGroup(string $title, array $actions): MainControls\Footer
54  {
55  $this->checkArgListElements('actions', $actions, [Link::class, Shy::class]);
56 
57  $clone = clone $this;
58  $clone->link_groups[] = [$title, $actions];
59  return $clone;
60  }
61 
65  public function getAdditionalLinkGroups(): array
66  {
67  return $this->link_groups;
68  }
69 
70  public function withAdditionalLink(Link|Shy ...$actions): MainControls\Footer
71  {
72  $this->checkArgListElements('actions', $actions, [Link::class, Shy::class]);
73 
74  $clone = clone $this;
75  array_push($clone->links, ...$actions);
76  return $clone;
77  }
78 
82  public function getAdditionalLinks(): array
83  {
84  return $this->links;
85  }
86 
87  public function withAdditionalIcon(Icon $icon, Signal|URI|null $action = null): MainControls\Footer
88  {
89  $clone = clone $this;
90  $clone->icons[] = [$icon, $action];
91  return $clone;
92  }
93 
97  public function getAdditionalIcons(): array
98  {
99  return $this->icons;
100  }
101 
102  public function withAdditionalText(string ...$texts): MainControls\Footer
103  {
104  $clone = clone $this;
105  array_push($clone->texts, ...$texts);
106  return $clone;
107  }
108 
112  public function getAdditionalTexts(): array
113  {
114  return $this->texts;
115  }
116 
117  public function withPermanentURL(URI $url): MainControls\Footer
118  {
119  $clone = clone $this;
120  $clone->permanent_url = $url;
121  return $clone;
122  }
123 
124  public function getPermanentURL(): ?URI
125  {
126  return $this->permanent_url;
127  }
128 
132  public function getModals(): array
133  {
134  return $this->modals;
135  }
136 
137  public function withAdditionalModal(Modal\RoundTrip $modal): MainControls\Footer
138  {
139  $clone = clone $this;
140  $clone->modals[] = $modal;
141  return $clone;
142  }
143 
144 }
This describes commonalities between the different modals.
Definition: Modal.php:34
$url
Definition: shib_logout.php:66
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
withAdditionalIcon(Icon $icon, Signal|URI|null $action=null)
Definition: Footer.php:87
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Factory.php:21
withAdditionalLinkGroup(string $title, array $actions)
Definition: Footer.php:53