ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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("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 }
global $DIC
Definition: saml.php:7
$factory
Definition: metadata.php:47
show_card_in_popover()
Create styles array
The data for the language used.