ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\ShowOnLoginPage Class Reference
+ Collaboration diagram for ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\ShowOnLoginPage:

Public Member Functions

 __construct (private readonly Provide $legal_documents, private readonly UI $ui, private readonly Closure $create_template)
 
 __invoke ()
 

Detailed Description

Definition at line 29 of file ShowOnLoginPage.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\ShowOnLoginPage::__construct ( private readonly Provide  $legal_documents,
private readonly UI  $ui,
private readonly Closure  $create_template 
)
Parameters
Closure(string)ilTemplate $create_template

Definition at line 34 of file ShowOnLoginPage.php.

38 {
39 }

Member Function Documentation

◆ __invoke()

ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\ShowOnLoginPage::__invoke ( )
Returns
list<Component>

Definition at line 44 of file ShowOnLoginPage.php.

44 : array
45 {
46 if ($this->legal_documents->document()->repository()->countAll() === 0) {
47 return [];
48 }
49
50 $template = ($this->create_template)('login_link.html');
51 $template->setVariable('LABEL', htmlentities($this->ui->txt('usr_agreement')));
52 $template->setVariable('HREF', $this->legal_documents->publicPage()->url());
53
54 return [$this->ui->create()->legacy()->content($template->get())];
55 }

References ILIAS\Repository\ui().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: