3 declare(strict_types=1);
14 $factory = $DIC->ui()->factory();
15 $renderer = $DIC->ui()->renderer();
17 $modal = $factory->modal()->roundtrip(
18 'Showing something off',
20 $factory->messageBox()->info(
'I am something.'),
22 )->withCancelButtonLabel(
23 'Thank you and goodbye' 24 )->withActionButtons([$factory->button()->standard(
'Nothing todo here',
'#')]);
26 $trigger = $factory->button()->standard(
'I will show you something', $modal->getShowSignal());
28 return $renderer->render([$modal, $trigger]);
with_custom_labels()
An example showing how you can set a custom label for the modals cancel-button.