Go to the source code of this file.
◆ show_popover_with_dynamic_changing_content()
show_popover_with_dynamic_changing_content |
( |
| ) |
|
Definition at line 2 of file show_popover_with_dynamic_changing_content.php.
References $_GET, $_SERVER, $DIC, $factory, $list, $url, and exit.
6 $renderer = $DIC->ui()->renderer();
19 if (isset(
$_GET[
'page']) &&
$_GET[
'page'] ==
'overview') {
22 $signalId =
$_GET[
'replaceSignal'];
23 $replaceSignal = new \ILIAS\UI\Implementation\Component\ReplaceContentSignal($signalId);
24 $button1 =
$factory->button()->standard(
'Go to page 1',
'#')
25 ->withOnClick($replaceSignal->withAsyncRenderUrl(
$url .
'&page=1&replaceSignal=' . $signalId));
26 $button2 =
$factory->button()->standard(
'Go to page 2',
'#')
27 ->withOnClick($replaceSignal->withAsyncRenderUrl(
$url .
'&page=2&replaceSignal=' . $signalId));
28 $button3 =
$factory->button()->standard(
'Go to page 3',
'#')
29 ->withOnClick($replaceSignal->withAsyncRenderUrl(
$url .
'&page=3&replaceSignal=' . $signalId));
30 $list =
$factory->listing()->unordered([$button1, $button2, $button3]);
36 if (isset(
$_GET[
'page'])) {
37 $page = (int)
$_GET[
'page'];
38 $signalId =
$_GET[
'replaceSignal'];
39 $replaceSignal = new \ILIAS\UI\Implementation\Component\ReplaceContentSignal($signalId);
40 $button =
$factory->button()->standard(
'Back to Overview',
'#')
41 ->withOnClick($replaceSignal->withAsyncRenderUrl(
$url .
'&page=overview&replaceSignal=' . $signalId));
42 $intro =
$factory->legacy(
"<p>You are viewing page {$page}</p>");
43 echo $renderer->renderAsync([$intro, $button]);
48 $popover =
$factory->popover()->standard(
$factory->legacy(
''))->withTitle(
'Pages');
49 $asyncUrl =
$url .
'&page=overview&replaceSignal=' . $popover->getReplaceContentSignal()->getId();
50 $popover = $popover->withAsyncContentUrl($asyncUrl);
51 $button =
$factory->button()->standard(
'Show Popover',
'#')
52 ->withOnClick($popover->getShowSignal());
53 return $renderer->render([$popover, $button]);
if(isset($_REQUEST['delete'])) $list
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']