ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
show_card_in_popover.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
35{
36 global $DIC;
37
38 // This example shows how to render a card containing an image and a descriptive list inside a popover.
39 $factory = $DIC->ui()->factory();
40 $renderer = $DIC->ui()->renderer();
41
42 $image = $factory->image()->responsive("./assets/images/logo/HeaderIcon.svg", "Thumbnail Example");
43 $card = $factory->card()->standard("Title", $image)->withSections(array($factory->legacy()->content("Hello World, I'm a card")));
44 $popover = $factory->popover()->standard($card)->withTitle('Card');
45 $button = $factory->button()->standard('Show Card', '#')
46 ->withOnClick($popover->getShowSignal());
47
48 return $renderer->render([$popover, $button]);
49}
$renderer
global $DIC
Definition: shib_login.php:26