ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\LegalDocuments\Legacy\Confirmation Class Reference
+ Collaboration diagram for ILIAS\LegalDocuments\Legacy\Confirmation:

Public Member Functions

 __construct (private readonly ilLanguage $language, ?Closure $create=null)
 
 render (string $link, string $command, string $cancel_command, string $message, array $items=[])
 

Private Attributes

readonly Closure $create
 

Detailed Description

Definition at line 27 of file Confirmation.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LegalDocuments\Legacy\Confirmation::__construct ( private readonly ilLanguage  $language,
?Closure  $create = null 
)
Parameters
Closure()ilConfirmationGUI $create

Definition at line 35 of file Confirmation.php.

36 {
37 $this->create = $create ?? static fn() => new ilConfirmationGUI();
38 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\LegalDocuments\Legacy\Confirmation\$create.

Member Function Documentation

◆ render()

ILIAS\LegalDocuments\Legacy\Confirmation::render ( string  $link,
string  $command,
string  $cancel_command,
string  $message,
array  $items = [] 
)
Parameters
array<int|string,string>$items

Definition at line 43 of file Confirmation.php.

43 : string
44 {
45 $confirmation = ($this->create)();
46 $confirmation->setFormAction($link);
47 $confirmation->setConfirm($this->language->txt('confirm'), $command);
48 $confirmation->setCancel($this->language->txt('cancel'), $cancel_command);
49 $confirmation->setHeaderText($message);
50 foreach ($items as $value => $label) {
51 $value = is_int($value) ? (string) $value : $value;
52 $confirmation->addItem('ids[]', $value, $label);
53 }
54
55 return $confirmation->getHTML();
56 }
$message
Definition: xapiexit.php:31

References ILIAS\LegalDocuments\Legacy\Confirmation\$create, $message, and ILIAS\UI\examples\Symbol\Glyph\Language\language().

+ Here is the call graph for this function:

Field Documentation

◆ $create

readonly Closure ILIAS\LegalDocuments\Legacy\Confirmation::$create
private

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