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

Functions

 base ()
 

description: > Example for rendering a dropdown button showing the default month/year while not opened and a selection of months while opened. More...

 

Function Documentation

◆ base()

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


description: > Example for rendering a dropdown button showing the default month/year while not opened and a selection of months while opened.

expected output: > ILIAS shows a button including a month and year. Clicking the button will open a selection of other months and years which can be selected. Another click onto a month opens a dialog which confirms the click. In this dialog the selected

month (e.g. 03-2020) is included.

Definition at line 35 of file base.php.

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

36 {
37  global $DIC;
38  $f = $DIC->ui()->factory();
39  $renderer = $DIC->ui()->renderer();
40 
41  return $renderer->render($f->button()->month("02-2017")->withOnLoadCode(function ($id) {
42  return "$(\"#$id\").on('il.ui.button.month.changed', function(el, id, month) { alert(\"Clicked: \" + id + ' with ' + month);});";
43  }));
44 }
$renderer
global $DIC
Definition: shib_login.php:22
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23