19 declare(strict_types=1);
41 string $a_icon_alt =
"" 43 $this->target->setTitle(...func_get_args());
48 $this->target->setExternalSorting($a_val);
53 $this->target->setDefaultOrderField($a_defaultorderfield);
58 $this->target->setDefaultOrderDirection($a_defaultorderdirection);
63 $this->target->setSelectableColumns(...$names);
68 $this->later[] = fn() => $this->target->addMultiCommand($a_cmd, $a_text);
74 string $a_onclick =
'',
78 $args = func_get_args();
79 $this->later[] = fn() => $this->target->addCommandButton(...$args);
85 $this->later[] = $filter->flush(...);
91 array_map(fn($proc) => $proc(), $this->later);
This class takes care of the order in which the methods must be called.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
setExternalSorting(bool $a_val)
asFilter(string $reset_command)
setSelectableColumns(string ... $names)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
__construct(private readonly ilTable2GUI $target)
setDefaultOrderField(string $a_defaultorderfield)
addMultiCommand(string $a_cmd, string $a_text)
setDefaultOrderDirection(string $a_defaultorderdirection)