ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\UI\examples\Card\Standard Namespace Reference

Functions

 base ()
 

description: > Example for rendering a base card. More...

 
 with_sections ()
 

expected output: > ILIAS shows a base ILIAS-Logo. More...

 
 with_title_action ()
 

expected output: > ILIAS shows a base ILIAS-Logo. More...

 

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.

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

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:22

◆ 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.

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

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 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ 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.

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

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 }
$renderer
$url
Definition: shib_logout.php:66
global $DIC
Definition: shib_login.php:22