ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
◀ ilDoc Overview
ShowOnLoginPage.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots
;
22
23
use
ILIAS\LegalDocuments\Provide
;
24
use
ILIAS\LegalDocuments\ConsumerToolbox\UI
;
25
use
ILIAS\UI\Component\Component
;
26
use
Closure
;
27
28
final
class
ShowOnLoginPage
29
{
33
public
function
__construct
(
34
private
readonly
Provide
$legal_documents,
35
private
readonly
UI
$ui,
36
private
readonly
Closure
$create_template
37
) {
38
}
39
43
public
function
__invoke
(): array
44
{
45
if
($this->legal_documents->document()->repository()->countAll() === 0) {
46
return
[];
47
}
48
49
$template = ($this->create_template)(
'login_link.html'
);
50
$template->setVariable(
'LABEL'
, htmlentities($this->
ui
->txt(
'usr_agreement'
)));
51
$template->setVariable(
'HREF'
, $this->legal_documents->publicPage()->url());
52
53
return
[$this->
ui
->create()->legacy($template->get())];
54
}
55
}
Factory
Component
ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\ShowOnLoginPage
Definition:
ShowOnLoginPage.php:28
Closure
ILIAS\LegalDocuments\Provide
Definition:
ProvideDocument.php:21
ILIAS\Repository\ui
ui()
Definition:
trait.GlobalDICGUIServices.php:53
UI
ILIAS\LegalDocuments\Provide
Definition:
Provide.php:31
ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots
Definition:
Agreement.php:21
ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\ShowOnLoginPage\__construct
__construct(private readonly Provide $legal_documents, private readonly UI $ui, private readonly Closure $create_template)
Definition:
ShowOnLoginPage.php:33
ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\ShowOnLoginPage\__invoke
__invoke()
Definition:
ShowOnLoginPage.php:43
Services
LegalDocuments
classes
ConsumerToolbox
ConsumerSlots
ShowOnLoginPage.php
Generated on Wed Sep 10 2025 14:11:32 for ILIAS by
1.8.13 (using
Doxyfile
)