ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
Footer.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 
28 use ILIAS\Data\URI;
29 
30 class Footer implements MainControls\Footer
31 {
32  use ComponentHelper;
33 
34  private string $text;
35  private array $links;
36 
40  private array $modalsWithTriggers = [];
41  protected ?URI $permanent_url = null;
42 
43  public function __construct(array $links, string $text = '')
44  {
45  $types = [Link::class,];
46  $this->checkArgListElements('links', $links, $types);
47  $this->links = $links;
48  $this->text = $text;
49  }
50 
51  public function getLinks(): array
52  {
53  return $this->links;
54  }
55 
56  public function getText(): string
57  {
58  return $this->text;
59  }
60 
61  public function withPermanentURL(URI $url): MainControls\Footer
62  {
63  $clone = clone $this;
64  $clone->permanent_url = $url;
65  return $clone;
66  }
67 
68  public function getPermanentURL(): ?URI
69  {
70  return $this->permanent_url;
71  }
72 
76  public function getModals(): array
77  {
78  return $this->modalsWithTriggers;
79  }
80 
82  Modal\RoundTrip $roundTripModal,
83  Button\Shy $shyButton
84  ): MainControls\Footer {
85  $shyButton = $shyButton->withOnClick($roundTripModal->getShowSignal());
86 
87  $clone = clone $this;
88  $clone->modalsWithTriggers[] = [$roundTripModal, $shyButton];
89  return $clone;
90  }
91 }
This describes commonalities between the different modals.
Definition: Modal.php:34
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Factory.php:21
withAdditionalModalAndTrigger(Modal\RoundTrip $roundTripModal, Button\Shy $shyButton)
Definition: Footer.php:81
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Bulky.php:21
The scope of this class is split ilias-conform URI&#39;s into components.
Definition: URI.php:34
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Factory.php:21
__construct(array $links, string $text='')
Definition: Footer.php:43
$url
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Factory.php:21
This describes the Footer.
Definition: Footer.php:32