ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
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.

References ILIAS\Repository\ui().

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  }
+ Here is the call graph for this function:

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