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

Functions

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

Function Documentation

◆ base()

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

description: > Example for rendering a bulky button.

note: > The exact look of the Bulky Buttons is mostly defined by the surrounding container.

expected output: >

ILIAS shows buttons with icons, glyphs and in some cases a title. Clicking the button won't activate any actions.

Definition at line 35 of file base.php.

36{
37 global $DIC;
38 $f = $DIC->ui()->factory();
39 $renderer = $DIC->ui()->renderer();
40
41 $ico = $f->symbol()->icon()
42 ->standard('someExample', 'Example')
43 ->withAbbreviation('E')
44 ->withSize('medium');
45 $button = $f->button()->bulky($ico, 'Icon', '#');
46
47 $glyph = $f->symbol()->glyph()->briefcase();
48 $button2 = $f->button()->bulky($glyph, 'Glyph', '#');
49
50 $button3 = $f->button()->bulky($glyph, '', '#');
51 $button4 = $f->button()->bulky($ico, '', '#');
52
53 return $renderer->render([
54 $button,
55 $f->divider()->horizontal(),
56 $button2,
57 $f->divider()->horizontal(),
58 $button3,
59 $f->divider()->horizontal(),
60 $button4
61 ]);
62}
$renderer
global $DIC
Definition: shib_login.php:26

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

Referenced by ilTableGUI\setBase().

+ Here is the caller graph for this function:

◆ engaged()

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

description: > Example for rendering an engaged bulky button

expected output: > ILIAS shows a button with a glyph and the title "Engaged". The button's background looks different from the base bulky button.

Clicking the button won't activate any actions.

Definition at line 33 of file engaged.php.

34{
35 global $DIC;
36 $f = $DIC->ui()->factory();
37 $renderer = $DIC->ui()->renderer();
38
39 $glyph = $f->symbol()->glyph()->briefcase();
40 $button = $f->button()->bulky($glyph, 'Engaged Button', '#')
41 ->withEngagedState(true);
42
43 return $renderer->render($button);
44}

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

Referenced by ILIAS\UI\Implementation\Component\Button\Toggle\__construct().

+ Here is the caller graph for this function:

◆ unavailable_action()

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

description: > This example provides the given button with an unavailable action.

expected output: > ILIAS shows a button with a glyph and the title "Unavailable". The button's background is grayed out. Clicking the button won't activate any actions.

note: > The disabled attribute is set in the DOM.

No action must be fired, even if done by keyboard.

Definition at line 37 of file unavailable_action.php.

38{
39 global $DIC;
40 $f = $DIC->ui()->factory();
41 $renderer = $DIC->ui()->renderer();
42
43 $glyph = $f->symbol()->glyph()->attachment();
44 $button = $f->button()->bulky($glyph, 'Unavailable', '#')->withUnavailableAction();
45
46 return $renderer->render([$button]);
47}

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

◆ with_tooltip()

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

description: > Example for rendering a bulky button with tooltips

expected output: > Hovering over the rendered text will show you the following tooltips: "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 $glyph = $f->symbol()->glyph()->comment();
39
40 $button = $f->button()
41 ->bulky($glyph, "Goto ILIAS", "http://www.ilias.de")
42 ->withHelpTopics(
43 ...$f->helpTopics("ilias", "learning management system")
44 );
45
46 return $renderer->render($button);
47}

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