3 declare(strict_types=1);
23 $f = $DIC->ui()->factory();
24 $r = $DIC->ui()->renderer();
35 $modal =
$f->modal()->roundtrip(
"Modal Title",
$f->legacy(
"b"));
36 $asyncUrl =
$url .
'&page=login&replaceSignal=' . $modal->getReplaceSignal()->getId();
37 $modal = $modal->withAsyncRenderUrl($asyncUrl);
38 $button =
$f->button()->standard(
"Sign In",
'#')
39 ->withOnClick($modal->getShowSignal());
40 return $r->render([$modal, $button]);
47 $button1 =
$f->button()->standard(
'Login',
'#')
48 ->withOnClick($replaceSignal->withAsyncRenderUrl(
$url .
'&page=login&replaceSignal=' . $replaceSignal->getId()));
49 $button2 =
$f->button()->standard(
'Registration',
'#')
50 ->withOnClick($replaceSignal->withAsyncRenderUrl(
$url .
'&page=register&replaceSignal=' . $replaceSignal->getId()));
53 if ($page ==
"login") {
54 $legacy =
$f->legacy(
"<p>The Login Page</p>");
55 $modal =
$f->modal()->roundtrip(
"Login", [$legacy])->withActionButtons([$button1, $button2]);
57 if ($page ==
"register") {
58 $legacy =
$f->legacy(
"<p>The Registration Page</p>");
59 $modal =
$f->modal()->roundtrip(
"Registration", [$legacy])->withActionButtons([$button1, $button2]);
62 echo
$r->renderAsync([$modal]);
show_multi_step_modal()
description: > Example for rendering a round trip multi-step modal.