3 declare(strict_types=1);
    43     protected \ILIAS\DI\UIServices 
$ui;
    45     protected string $cmd = 
"";
    56         $this->
ui = $DIC->ui();
    57         $this->
toolbar = $DIC->toolbar();
    58         $this->type = self::TYPE_STD;
    64         $this->type = self::TYPE_SUBMIT;
    70         $this->type = self::TYPE_STD_PRIMARY;
    71         $this->is_primary = 
true;
    75     public function onClick(
string $on_click): self
    90         if ($this->is_primary) {
    91             $b = $this->
ui->factory()->button()->primary(
    96             $b = $this->
ui->factory()->button()->standard(
   101         $b = 
$b->withOnLoadCode(
function (
$id) use ($cmd) {
   104     const el = document.getElementById(
'$id');
   105     el.name = 
"cmd[$cmd]";
   116         return $this->
ui->factory()->button()->standard(
   124         return $this->
ui->factory()->button()->primary(
   132         switch ($this->type) {
   133             case self::TYPE_SUBMIT:
   137             case self::TYPE_STD_PRIMARY:
   145         if ($this->on_click !== 
"") {
   147             $button = $button->withOnLoadCode(
function (
$id) use ($click) {
   150     const el = document.getElementById(
'$id').addEventListener(
'click', () => { $click });
   167         if (is_null($toolbar)) {
   173             $toolbar->addComponent($button);
   179         return $this->
ui->renderer()->render($this->
getButton());
 
Interface Observer  Contains several chained tasks and infos about them. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins