ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\UI\examples\Button\Close Namespace Reference

Functions

 base ()
 

description: > This example is rather artificial, since the close button is only used in other components (see purpose). More...

 
 modal ()
 

description: > This example shows a scenario in which the Close Button is used in an overlay as indicated in the purpose description. More...

 

Function Documentation

◆ base()

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


description: > This example is rather artificial, since the close button is only used in other components (see purpose).

expected output: > ILIAS a dark grey "X" in the right corner. Clicking the "X" won't activate any action.

note: > In some cases, additional CSS will be required for placing the button

properly by the surrounding component.

Definition at line 37 of file base.php.

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

38 {
39  global $DIC;
40  $f = $DIC->ui()->factory();
41  $renderer = $DIC->ui()->renderer();
42 
43  return $renderer->render($f->button()->close());
44 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ modal()

ILIAS\UI\examples\Button\Close\modal ( )


description: > This example shows a scenario in which the Close Button is used in an overlay as indicated in the purpose description.

Note that in the Modal the Close Button is properly placed in the top right corner.

expected output: > ILIAS shows a button titled "Show Close Button Demo". Clicking the button will open a modal with text and a Close-Button.

A click onto the button will close the modal.

Definition at line 35 of file modal.php.

References $DIC, and $renderer.

36 {
37  global $DIC;
38  $factory = $DIC->ui()->factory();
39  $renderer = $DIC->ui()->renderer();
40 
41  $modal = $factory->modal()->roundtrip(
42  'Close Button Demo',
43  $factory->legacy()->content('See the Close Button in the top right corner.')
44  );
45  $button1 = $factory->button()->standard('Show Close Button Demo', '#')
46  ->withOnClick($modal->getShowSignal());
47 
48  return $renderer->render([$button1, $modal]);
49 }
$renderer
global $DIC
Definition: shib_login.php:22