ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
show_card_in_popover.php File Reference

Go to the source code of this file.

Functions

 show_card_in_popover ()
 

Function Documentation

◆ show_card_in_popover()

show_card_in_popover ( )

Definition at line 2 of file show_card_in_popover.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}
$factory
Definition: metadata.php:43
global $DIC
Definition: saml.php:7

References $DIC, and $factory.