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

Functions

 base ()
 

description: > Example for rendering a standard item. More...

 
 with_audio_player ()
 

description: > Example for rendering a standard item with an audio player. More...

 
 with_image_and_progress ()
 

description: > Example for rendering a standard item with an image and displaying the progress. More...

 
 with_lead_avatar ()
 

description: > Example for rendering a standard item with an lead avatar. More...

 
 with_lead_icon ()
 

description: > Example for rendering a standard item with an lead icon. More...

 
 with_lead_image ()
 

description: > Example for rendering a standard item with an lead image. More...

 
 with_lead_text ()
 

description: > Example for rendering a standard item with an lead text. More...

 
 with_link_title ()
 

description: > Example for rendering a standard item with a link title. More...

 
 with_main_action ()
 

description: > Example for rendering a standard item with main actions. More...

 
 with_main_link_action ()
 

description: > Example for rendering a standard item with a main action displayed as a link. More...

 
 with_progress ()
 

description: > Example for rendering a standard item with a progress meter. More...

 
 with_shy_properties ()
 

description: > Example for rendering a standard item with shy properties. More...

 
 with_shy_title ()
 

description: > Example for rendering a standard item with shy titles. More...

 

Function Documentation

◆ base()

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


description: > Example for rendering a standard item.

expected output: > ILIAS shows a box including the following informations: A heading "Item Title" with a dummy text in small writings ("Lorem ipsum...") below. Beneath those you can see a fine line and more informations about "Origin", "Last Update"

and "Location". Additionally a action menu is displayed in the box on the right top.

Definition at line 34 of file base.php.

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

35 {
36  global $DIC;
37  $f = $DIC->ui()->factory();
38  $renderer = $DIC->ui()->renderer();
39  $actions = $f->dropdown()->standard(array(
40  $f->button()->shy("ILIAS", "https://www.ilias.de"),
41  $f->button()->shy("GitHub", "https://www.github.com")
42  ));
43  $app_item = $f->item()->standard("Item Title")
44  ->withActions($actions)
45  ->withProperties(array(
46  "Origin" => "Course Title 1",
47  "Last Update" => "24.11.2011",
48  "Location" => "Room 123, Main Street 44, 3012 Bern"))
49  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
50  return $renderer->render($app_item);
51 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ with_audio_player()

ILIAS\UI\examples\Item\Standard\with_audio_player ( )


description: > Example for rendering a standard item with an audio player.

expected output: > ILIAS shows a box with the following informations: The ILIAS-Logo, "ILIAS Audio" as heading and a dummy text in small writings ("Lorem ipsum...") below. Beneath those you can see a player to play an audio file. Below that player a fine line and more informations about the lengths of the file are displayed. Additionally the box includes an action menu

on the right top.

Definition at line 35 of file with_audio_player.php.

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

35  : string
36 {
37  global $DIC;
38  $f = $DIC->ui()->factory();
39  $renderer = $DIC->ui()->renderer();
40 
41  $actions = $f->dropdown()->standard(array(
42  $f->button()->shy("ILIAS", "https://www.ilias.de"),
43  $f->button()->shy("GitHub", "https://www.github.com")
44  ));
45 
46  $audio = $f->player()->audio("https://files.ilias.de/ILIAS-Audio.mp3", "");
47 
48  $app_item = $f->item()->standard("ILIAS Audio")
49  ->withActions($actions)
50  ->withAudioPlayer($audio)
51  ->withProperties(array(
52  "Length" => "00:00:26"))
53  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.")
54  ->withLeadImage($f->image()->responsive(
55  "assets/ui-examples/images/Image/HeaderIconLarge.svg",
56  "Thumbnail Example"
57  ));
58  return $renderer->render($app_item);
59 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ with_image_and_progress()

ILIAS\UI\examples\Item\Standard\with_image_and_progress ( )


description: > Example for rendering a standard item with an image and displaying the progress.

expected output: > ILIAS shows a box including the following informations: A heading "Item Title" with a dummy text in small writings ("Lorem ipsum...") below. On the left side a ILIAS icon is displayed, on the right side you can see a pictorial representation

and also a text (75%) about the progress.

Definition at line 34 of file with_image_and_progress.php.

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

35 {
36  global $DIC;
37  $f = $DIC->ui()->factory();
38  $renderer = $DIC->ui()->renderer();
39  $chart = $f->chart()->progressMeter()->standard(100, 75);
40  $app_item = $f->item()->standard("Item Title")
41  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.")
42  ->withProgress($chart)
43  ->withLeadImage($f->image()->responsive(
44  "assets/ui-examples/images/Image/HeaderIconLarge.svg",
45  "Thumbnail Example"
46  ));
47  return $renderer->render($app_item);
48 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ with_lead_avatar()

ILIAS\UI\examples\Item\Standard\with_lead_avatar ( )


description: > Example for rendering a standard item with an lead avatar.

expected output: > ILIAS shows two very similiar boxes including the following informations: A heading with a dummy text in small writings ("Lorem ipsum...") below. Beneath those you can see a fine line and more informations about "Last Login" and "Location". Additionally an action menu is displayed in the box on the right top. On the left side an avatar is

displayed.

Definition at line 35 of file with_lead_avatar.php.

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

36 {
37  global $DIC;
38  $f = $DIC->ui()->factory();
39  $renderer = $DIC->ui()->renderer();
40  $actions = $f->dropdown()->standard(array(
41  $f->button()->shy("ILIAS", "https://www.ilias.de"),
42  $f->button()->shy("GitHub", "https://www.github.com")
43  ));
44  $app_item1 = $f->item()->standard("Max Mustermann")
45  ->withActions($actions)
46  ->withProperties(array(
47  "Last Login" => "24.11.2011",
48  "Location" => "Hamburg"))
49  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.")
50  ->withLeadAvatar($f->symbol()->avatar()->letter('mm'));
51  $app_item2 = $f->item()->standard("Erika Mustermann")
52  ->withActions($actions)
53  ->withProperties(array(
54  "Last Login" => "3.12.2018",
55  "Location" => "Berlin"))
56  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.")
57  ->withLeadAvatar($f->symbol()->avatar()->picture('./assets/images/placeholder/no_photo_xsmall.jpg', 'demo.user'));
58  return $renderer->render([$app_item1, $f->divider()->horizontal(), $app_item2]);
59 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ with_lead_icon()

ILIAS\UI\examples\Item\Standard\with_lead_icon ( )


description: > Example for rendering a standard item with an lead icon.

expected output: > ILIAS shows a box including the following informations: A heading with a dummy text in small writings ("Lorem ipsum...") below. Beneath those you can see a fine line and more informations about "Origin", "Last Update" and "Location". Additionally a action menu is displayed in the box on the right top. On the left side a "Course" icon

is displayed.

Definition at line 35 of file with_lead_icon.php.

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

36 {
37  global $DIC;
38  $f = $DIC->ui()->factory();
39  $renderer = $DIC->ui()->renderer();
40  $actions = $f->dropdown()->standard(array(
41  $f->button()->shy("ILIAS", "https://www.ilias.de"),
42  $f->button()->shy("GitHub", "https://www.github.com")
43  ));
44  $app_item = $f->item()->standard("ILIAS Course")
45  ->withActions($actions)
46  ->withProperties(array(
47  "Origin" => "Course Title 1",
48  "Last Update" => "24.11.2011",
49  "Location" => "Room 123, Main Street 44, 3012 Bern"))
50  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.")
51  ->withLeadIcon($f->symbol()->icon()->standard('crs', 'Course', 'medium'));
52  return $renderer->render($app_item);
53 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ with_lead_image()

ILIAS\UI\examples\Item\Standard\with_lead_image ( )


description: > Example for rendering a standard item with an lead image.

expected output: > ILIAS shows a box including the following informations: A heading with a dummy text in small writings ("Lorem ipsum...") below. Beneath those you can see a fine line and more informations about "Origin", "Last Update" and "Location". Additionally a action menu is displayed in the box on the right top. On the left side a ILIAS-Logo

is displayed.

Definition at line 34 of file with_lead_image.php.

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

35 {
36  global $DIC;
37  $f = $DIC->ui()->factory();
38  $renderer = $DIC->ui()->renderer();
39  $actions = $f->dropdown()->standard(array(
40  $f->button()->shy("ILIAS", "https://www.ilias.de"),
41  $f->button()->shy("GitHub", "https://www.github.com")
42  ));
43  $app_item = $f->item()->standard("ILIAS Course")
44  ->withActions($actions)
45  ->withProperties(array(
46  "Origin" => "Course Title 1",
47  "Last Update" => "24.11.2011",
48  "Location" => "Room 123, Main Street 44, 3012 Bern"))
49  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.")
50  ->withLeadImage($f->image()->responsive(
51  "assets/ui-examples/images/Image/HeaderIconLarge.svg",
52  "Thumbnail Example"
53  ));
54  return $renderer->render($app_item);
55 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ with_lead_text()

ILIAS\UI\examples\Item\Standard\with_lead_text ( )


description: > Example for rendering a standard item with an lead text.

expected output: > ILIAS shows a box including the following informations: A heading with a dummy text in small writings ("Lorem ipsum...") below. Beneath those you can see a fine line and more informations about "Origin", "Last Update" and "Location". Additionally a action menu is displayed in the box on the right top. On the left side a period of time

(11:20-12:40) is displayed.

Definition at line 35 of file with_lead_text.php.

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

36 {
37  global $DIC;
38  $f = $DIC->ui()->factory();
39  $renderer = $DIC->ui()->renderer();
40  $actions = $f->dropdown()->standard(array(
41  $f->button()->shy("ILIAS", "https://www.ilias.de"),
42  $f->button()->shy("GitHub", "https://www.github.com")
43  ));
44  $app_item = $f->item()->standard("Weekly Meeting")
45  ->withActions($actions)
46  ->withProperties(array(
47  "Origin" => "Course Title 1",
48  "Last Update" => "24.11.2011",
49  "Location" => "Room 123, Main Street 44, 3012 Bern"))
50  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.")
51  ->withLeadText("11:20 - 12:40");
52  return $renderer->render($app_item);
53 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ with_link_title()

ILIAS\UI\examples\Item\Standard\with_link_title ( )


description: > Example for rendering a standard item with a link title.

expected output: > ILIAS shows a box including the following informations: A title with a dummy text in small writings ("Lorem ipsum...") below. Beneath those you can see a fine line and more informations about "Code Repo" and

"Location". The title is rendered as a link and redirects to ilias.de.

Definition at line 34 of file with_link_title.php.

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

35 {
36  global $DIC;
37  $f = $DIC->ui()->factory();
38  $renderer = $DIC->ui()->renderer();
39  $app_item = $f->item()->standard($f->link()->standard("ILIAS", "https://www.ilias.de"))
40  ->withProperties(array(
41  "Code Repo" => $f->button()->shy("ILIAS on GitHub", "https://www.github.com/ILIAS-eLearning/ILIAS"),
42  "Location" => "Room 123, Main Street 44, 3012 Bern"))
43  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
44  return $renderer->render($app_item);
45 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ with_main_action()

ILIAS\UI\examples\Item\Standard\with_main_action ( )


description: > Example for rendering a standard item with main actions.

expected output: > ILIAS shows a box including the following informations: A heading with a dummy text in small writings ("Lorem ipsum...") below. Beneath those you can see a fine line and more informations about "Origin", "Last Update" and "Location". Additionally a action menu is displayed in the box on the right top. On the left next to the action

menu a "Edit" button ist rendered.

Definition at line 35 of file with_main_action.php.

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

36 {
37  global $DIC;
38  $f = $DIC->ui()->factory();
39  $renderer = $DIC->ui()->renderer();
40  $actions = $f->dropdown()->standard(array(
41  $f->button()->shy("ILIAS", "https://www.ilias.de"),
42  $f->button()->shy("GitHub", "https://www.github.com")
43  ));
44  $main_action = $f->button()->standard("Edit", "#");
45  $app_item = $f->item()->standard("Item Title")
46  ->withActions($actions)
47  ->withMainAction($main_action)
48  ->withProperties(array(
49  "Origin" => "Course Title 1",
50  "Last Update" => "24.11.2011",
51  "Location" => "Room 123, Main Street 44, 3012 Bern"))
52  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
53  return $renderer->render($app_item);
54 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ with_main_link_action()

ILIAS\UI\examples\Item\Standard\with_main_link_action ( )


description: > Example for rendering a standard item with a main action displayed as a link.

expected output: > ILIAS shows a box including the following informations: A heading with a dummy text in small writings ("Lorem ipsum...") below. Beneath those you can see a fine line and more informations about "Origin", "Last Update"

and "Location". Additionally a link titled "Open ILIAS" is rendered on the right top side of the box.

Definition at line 34 of file with_main_link_action.php.

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

35 {
36  global $DIC;
37  $f = $DIC->ui()->factory();
38  $renderer = $DIC->ui()->renderer();
39  $main_action = $f->link()->standard("Open ILIAS", "https://www.ilias.de");
40  $app_item = $f->item()->standard("Item Title")
41  ->withMainAction($main_action)
42  ->withProperties(array(
43  "Origin" => "Course Title 1",
44  "Last Update" => "24.11.2011",
45  "Location" => "Room 123, Main Street 44, 3012 Bern"))
46  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
47  return $renderer->render($app_item);
48 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ with_progress()

ILIAS\UI\examples\Item\Standard\with_progress ( )


description: > Example for rendering a standard item with a progress meter.

expected output: > ILIAS shows a box including the following informations: A heading with a dummy text in small writings

("Lorem ipsum...") below. Additionally a progress meter (75%) is rendered on the right top side of the box.

Definition at line 33 of file with_progress.php.

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

34 {
35  global $DIC;
36  $f = $DIC->ui()->factory();
37  $renderer = $DIC->ui()->renderer();
38  $chart = $f->chart()->progressMeter()->standard(100, 75);
39  $app_item = $f->item()->standard("Item Title")
40  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.")
41  ->withProgress($chart);
42  return $renderer->render($app_item);
43 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ with_shy_properties()

ILIAS\UI\examples\Item\Standard\with_shy_properties ( )


description: > Example for rendering a standard item with shy properties.

expected output: > ILIAS shows a box including the following informations: A heading with a dummy text in small writings ("Lorem ipsum...") below. Beneath those you can see a fine line and more informations about "LMS", "Code Repo"

and "Location". Properties of "LMS" ("ILIAS") an "Code Repo" ("GitHub") are rendered as shy buttons and are functioning as links.

Definition at line 34 of file with_shy_properties.php.

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

35 {
36  global $DIC;
37  $f = $DIC->ui()->factory();
38  $renderer = $DIC->ui()->renderer();
39  $app_item = $f->item()->standard("Item Title")
40  ->withProperties(array(
41  "LMS" => $f->button()->shy("ILIAS", "https://www.ilias.de"),
42  "Code Repo" => $f->button()->shy("GitHub", "https://www.github.com"),
43  "Location" => "Room 123, Main Street 44, 3012 Bern"))
44  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
45  return $renderer->render($app_item);
46 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ with_shy_title()

ILIAS\UI\examples\Item\Standard\with_shy_title ( )


description: > Example for rendering a standard item with shy titles.

expected output: > ILIAS shows a box including the following informations: A heading with a dummy text in small writings ("Lorem ipsum...") below. Beneath those you can see a fine line and more informations about "Code Repo"

and "Location". "Code Repo" ("ILIAS") is rendered as shy link.

Definition at line 34 of file with_shy_title.php.

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

35 {
36  global $DIC;
37  $f = $DIC->ui()->factory();
38  $renderer = $DIC->ui()->renderer();
39  $app_item = $f->item()->standard($f->button()->shy("ILIAS", "https://www.ilias.de"))
40  ->withProperties(array(
41  "Code Repo" => $f->button()->shy("GitHub", "https://www.github.com"),
42  "Location" => "Room 123, Main Street 44, 3012 Bern"))
43  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
44  return $renderer->render($app_item);
45 }
$renderer
global $DIC
Definition: shib_login.php:22