ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ToastFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
31{
32 public function __construct(private ToastRendererFactory $renderer_factory)
33 {
34 }
35
51 public function standard(
52 IdentificationInterface $identification,
53 string $title,
54 ?Icon $icon = null
57 $identification,
58 $this->renderer_factory->getRenderer(StandardToastItem::class),
59 $title,
60 $icon
61 );
62 }
63
70 public function action(string $identifier, string $title, \Closure $action): ToastAction
71 {
72 return new ToastAction($identifier, $title, $action);
73 }
74}
__construct(private ToastRendererFactory $renderer_factory)
standard(IdentificationInterface $identification, string $title, ?Icon $icon=null)
Your Toasts shiuld provide Callables which are executed on some events: onShow, onClose,...
action(string $identifier, string $title, \Closure $action)
A ToastAction leads into the rendered toast to a link that can be clicked by the user.
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This describes how an icon could be modified during construction of UI.
Definition: Icon.php:29