19 declare(strict_types=1);
43 public function render(
string $link,
string $command,
string $cancel_command,
string $message, array $items = []): string
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);
55 return $confirmation->getHTML();
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
render(string $link, string $command, string $cancel_command, string $message, array $items=[])
__construct(private readonly ilLanguage $language, ?Closure $create=null)
language()
description: > Example for rendring a language glyph.