19 declare(strict_types=1);
36 $factory = $DIC->ui()->factory();
39 $modal = $factory->modal()->roundtrip(
'My Modal 1', $factory->legacy()->content(
'My Content'))
41 $factory->button()->primary(
'Primary Action',
''),
42 $factory->button()->standard(
'Secondary Action',
''),
46 $button1 = $factory->button()->standard(
'Open Modal 1',
'#')
47 ->withOnClick($modal->getShowSignal());
50 $button2 = $button1->withLabel(
'Also opens modal 1');
53 $button3 = $button2->withLabel(
'Does not open modal 1')
54 ->withResetTriggeredSignals();
show_the_same_modal_with_different_buttons()
description: > Example for rendering a round trip modal with different buttons.