ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ShowOnScreenMessage.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
28{
29 public function __construct(
30 private readonly PageFragment $inner,
31 private readonly string $type,
32 private readonly string $txt,
33 private readonly bool $keep
34 ) {
35 }
36
37 public function render(ilGlobalTemplateInterface $main_template, Renderer $renderer): string
38 {
39 $main_template->setOnScreenMessage($this->type, $this->txt, $this->keep);
40 return $this->inner->render($main_template, $renderer);
41 }
42}
$renderer
render(ilGlobalTemplateInterface $main_template, Renderer $renderer)
__construct(private readonly PageFragment $inner, private readonly string $type, private readonly string $txt, private readonly bool $keep)
$txt
Definition: error.php:31
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
An entity that renders components to a string output.
Definition: Renderer.php:31