ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
Footer.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 2019 Nils Haagen <nils.haagen@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4 
6 
11 
15 class Footer implements MainControls\Footer
16 {
17  use ComponentHelper;
18 
19  private $text = '';
20 
21  private $links = [];
22 
24  private $modalsWithTriggers = [];
25 
29  protected $permanent_url = "";
30 
31  public function __construct(array $links, string $text = '')
32  {
33  $types = [\ILIAS\UI\Component\Link\Link::class,];
34  $this->checkArgListElements('links', $links, $types);
35  $this->links = $links;
36  $this->text = $text;
37  }
38 
39  public function getLinks() : array
40  {
41  return $this->links;
42  }
43 
44  public function getText() : string
45  {
46  return $this->text;
47  }
48 
49  public function withPermanentURL(\ILIAS\Data\URI $url) : MainControls\Footer
50  {
51  $clone = clone $this;
52  $clone->permanent_url = $url;
53  return $clone;
54  }
55 
56  public function getPermanentURL()
57  {
58  return $this->permanent_url;
59  }
60 
61  public function getModals() : array
62  {
63  return $this->modalsWithTriggers;
64  }
65 
67  Modal\RoundTrip $roundTripModal,
68  Button\Shy $shyButton
69  ) : \ILIAS\UI\Component\MainControls\Footer {
70  $shyButton = $shyButton->withOnClick($roundTripModal->getShowSignal());
71 
72  $clone = clone $this;
73  $clone->modalsWithTriggers[] = [$roundTripModal, $shyButton];
74  return $clone;
75  }
76 }
This describes commonalities between the different modals.
Definition: Modal.php:13
Class Factory.
withAdditionalModalAndTrigger(Modal\RoundTrip $roundTripModal, Button\Shy $shyButton)
Definition: Footer.php:66
Class ChatMainBarProvider .
trait ComponentHelper
Provides common functionality for component implementations.
The scope of this class is split ilias-conform URI&#39;s into components.
Definition: URI.php:17
__construct(array $links, string $text='')
Definition: Footer.php:31
$url
checkArgListElements($which, array &$values, $classes)
Check every element of the list if it is an instance of one of the given classes. ...
This describes the Footer.
Definition: Footer.php:15