ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
show_card_in_popover.php
Go to the documentation of this file.
1<?php
3{
4 global $DIC;
5
6 // This example shows how to render a card containing an image and a descriptive list inside a popover.
7 $factory = $DIC->ui()->factory();
8 $renderer = $DIC->ui()->renderer();
9
10 $image = $factory->image()->responsive("./templates/default/images/HeaderIcon.svg", "Thumbnail Example");
11 $card = $factory->card()->standard("Title", $image)->withSections(array($factory->legacy("Hello World, I'm a card")));
12 $popover = $factory->popover()->standard($card)->withTitle('Card');
13 $button = $factory->button()->standard('Show Card', '#')
14 ->withOnClick($popover->getShowSignal());
15
16 return $renderer->render([$popover, $button]);
17}
An exception for terminatinating execution or to throw for unit testing.
$factory
Definition: metadata.php:58
show_card_in_popover()
$DIC
Definition: xapitoken.php:46