ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\UI\examples\Card\Standard Namespace Reference

Functions

 base ()
 
 with_sections ()
 
 with_title_action ()
 

Function Documentation

◆ base()

ILIAS\UI\examples\Card\Standard\base ( )

description: > Example for rendering a base card.

expected output: >

ILIAS shows a ILIAS-Logo with a title below. The size of the logo depends on the browser/desktop size and will change accordingly.

Definition at line 32 of file base.php.

33{
34 //Init Factory and Renderer
35 global $DIC;
36 $f = $DIC->ui()->factory();
37 $renderer = $DIC->ui()->renderer();
38
39 $content = $f->listing()->descriptive(
40 array(
41 "Entry 1" => "Some text",
42 "Entry 2" => "Some more text",
43 )
44 );
45
46 $image = $f->image()->responsive(
47 "./assets/images/logo/HeaderIcon.svg",
48 "Thumbnail Example"
49 );
50
51 $card = $f->card()->standard("Title", $image);
52
53 //Render
54 return $renderer->render($card);
55}
$renderer
global $DIC
Definition: shib_login.php:26

References $DIC, Vendor\Package\$f, and $renderer.

◆ with_sections()

ILIAS\UI\examples\Card\Standard\with_sections ( )

expected output: > ILIAS shows a base ILIAS-Logo. Additionally, a descriptive listing consisting of two entries is repeated three

times below the title.

Definition at line 30 of file with_sections.php.

31{
32 //Init Factory and Renderer
33 global $DIC;
34 $f = $DIC->ui()->factory();
35 $renderer = $DIC->ui()->renderer();
36
37 $content = $f->listing()->descriptive(
38 array(
39 "Entry 1" => "Some text",
40 "Entry 2" => "Some more text",
41 )
42 );
43
44 $image = $f->image()->responsive(
45 "./assets/images/logo/HeaderIcon.svg",
46 "Thumbnail Example"
47 );
48
49 $card = $f->card()->standard(
50 "Title",
51 $image
52 )->withSections(
53 array(
54 $content,
55 $content,
56 $content
57 )
58 );
59
60 //Render
61 return $renderer->render($card);
62}

References $DIC, Vendor\Package\$f, and $renderer.

◆ with_title_action()

ILIAS\UI\examples\Card\Standard\with_title_action ( )

expected output: >

ILIAS shows a base ILIAS-Logo. A clickable title, linked to ilias.de, is displayed below the logo.

Definition at line 29 of file with_title_action.php.

30{
31 //Init Factory and Renderer
32 global $DIC;
33 $f = $DIC->ui()->factory();
34 $renderer = $DIC->ui()->renderer();
35
36 $image = $f->image()->responsive(
37 "./assets/images/logo/HeaderIcon.svg",
38 "Thumbnail Example"
39 );
40
41 $url = "http://www.ilias.de";
42
43 $card = $f->card()->standard("Title", $image)->withTitleAction($url);
44
45 //Render
46 return $renderer->render($card);
47}
$url
Definition: shib_logout.php:68

References $DIC, Vendor\Package\$f, $renderer, and $url.