ILIAS  release_7 Revision v7.30-3-g800a261c036
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
16{
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}
An exception for terminatinating execution or to throw for unit testing.
The scope of this class is split ilias-conform URI's into components.
Definition: URI.php:18
__construct(array $links, string $text='')
Definition: Footer.php:31
withAdditionalModalAndTrigger(Modal\RoundTrip $roundTripModal, Button\Shy $shyButton)
Definition: Footer.php:66
A component is the most general form of an entity in the UI.
Definition: Component.php:14
This describes the Footer.
Definition: Footer.php:16
This describes commonalities between the different modals.
Definition: Modal.php:14
checkArgListElements($which, array &$values, $classes)
Check every element of the list if it is an instance of one of the given classes.
trait ComponentHelper
Provides common functionality for component implementations.
Class ChatMainBarProvider \MainMenu\Provider.
Class Factory.
$url