ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\UI\examples\Button\Shy Namespace Reference

Functions

 base ()
 
 engaged ()
 
 unavailable_action ()
 
 with_glyph ()
 
 with_tooltip ()
 

Function Documentation

◆ base()

ILIAS\UI\examples\Button\Shy\base ( )

description: > Example for rendering a shy button.

expected output: > The shown button lacks a background, but shows a text. Clicking the button will

open the website www.ilias.de in the same browser window.

Definition at line 33 of file base.php.

34{
35 global $DIC;
36 $f = $DIC->ui()->factory();
37 $renderer = $DIC->ui()->renderer();
38
39 return $renderer->render($f->button()->shy("ILIAS", "http://www.ilias.de"));
40}
$renderer
global $DIC
Definition: shib_login.php:26

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

◆ engaged()

ILIAS\UI\examples\Button\Shy\engaged ( )

description: > Example for rendering an engaged shy button

expected output: >

ILIAS shows a small button with a title. Clicking the button won't activate any actions.

Definition at line 32 of file engaged.php.

33{
34 global $DIC;
35 $f = $DIC->ui()->factory();
36 $renderer = $DIC->ui()->renderer();
37
38 $button = $f->button()->shy("Engaged Button", "#")
39 ->withEngagedState(true);
40 return $renderer->render($button);
41}

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

◆ unavailable_action()

ILIAS\UI\examples\Button\Shy\unavailable_action ( )

description: > This example provides the given button with an unavailable action. Note that the disabled attribute is set in the DOM. No action must be fired, even if done by keyboard.

expected output: > ILIAS shows a small button with a title. The button's background is colored dark grey. Clicking the button

won't activate any actions.

Definition at line 35 of file unavailable_action.php.

36{
37 global $DIC;
38 $f = $DIC->ui()->factory();
39 $renderer = $DIC->ui()->renderer();
40
41 $button = $f->button()->shy('Unavailable', '#')->withUnavailableAction();
42
43 return $renderer->render([$button]);
44}

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

◆ with_glyph()

ILIAS\UI\examples\Button\Shy\with_glyph ( )

description: > This example provides buttons with a Glyph in (and as) the label.

expected output: > ILIAS shows a button with the Search Gylph and in some cases a label in different states.

Clicking the button won't activate any actions.

Definition at line 33 of file with_glyph.php.

34{
35 global $DIC;
36 $f = $DIC->ui()->factory();
37 $renderer = $DIC->ui()->renderer();
38
39 $glyph = $f->symbol()->glyph()->search();
40 $button = $f->button()->shy('search', "#")
41 ->withSymbol($glyph);
42 $button2 = $button->withLabel('');
43
44 return $renderer->render([
45 $button,
46 $button->withEngagedState(true),
47 $button->withUnavailableAction(true),
48 $f->divider()->vertical(),
49 $button2,
50 $button2->withEngagedState(true),
51 $button2->withUnavailableAction(true),
52
53 ]);
54}

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

◆ with_tooltip()

ILIAS\UI\examples\Button\Shy\with_tooltip ( )

description: > Example for rendering a shy button with tooltips

expected output: > Hovering over the rendered button will show a tooltip with the following contents:

"tooltip: ilias" and "tooltip: learning management system".

Definition at line 33 of file with_tooltip.php.

34{
35 global $DIC;
36 $f = $DIC->ui()->factory();
37 $renderer = $DIC->ui()->renderer();
38
39 $button = $f->button()
40 ->shy("Goto ILIAS", "http://www.ilias.de")
41 ->withHelpTopics(
42 ...$f->helpTopics("ilias", "learning management system")
43 );
44
45 return $renderer->render($button);
46}

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