19 declare(strict_types=1);
51 private readonly
Closure $criterion_as_component,
53 private readonly
UI $ui,
58 $this->create = $create ?? fn($class, ...$args) =>
new $class(...$args);
65 'order' => [$this->
ui->txt(
'tbl_docs_head_sorting'),
'',
'5%'],
66 'title' => [$this->
ui->txt(
'tbl_docs_head_title'),
'',
'25%'],
67 'created' => [$this->
ui->txt(
'tbl_docs_head_created')],
68 'change' => [$this->
ui->txt(
'tbl_docs_head_last_change')],
69 'criteria' => [$this->
ui->txt(
'tbl_docs_head_criteria')],
75 $config->
setTitle($this->
ui->txt(
'tbl_docs_title'));
86 $step = $this->
step();
100 'order' => fn() => $render_order->render(),
102 'created' => ($this->format_date)($document->
meta()->creation()->time()),
103 'change' => ($this->format_date)($document->
meta()->lastModification()->time()),
115 return $this->
ui->txt(
'tbl_docs_cell_not_criterion');
130 $this->
ui->create()->legacy(
'<br/>'),
136 return ($this->criterion_as_component)($criterion->
content());
141 $input = (
$this->create)(ilNumberInputGUI::class,
'',
'order[' . $document->
id() .
']');
142 $input->setValue((
string) $sorting);
143 $input->setMaxLength(4);
145 $input->setDisabled(
true);
153 return static function () use (&$step):
int {
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ilObjUser $user=null,)
repository()
description: > Example for rendering a repository card
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
row(Document $document, int $sorting)
readonly Closure $format_date
criterionName(Criterion $criterion)
showCriteria(Document $document, Closure $proc)
showCriterion(Criterion $criterion)
orderInputGui(Document $document, int $sorting)
rows(TableSelection $select)
__construct(private readonly Closure $criterion_as_component, private readonly DocumentRepository $repository, private readonly UI $ui, private readonly DocumentModal $modal, ?Closure $create=null, ?Closure $format_date=null)
config(TableConfig $config)
modal(string $title="", string $cancel_label="")
mapSelection(Closure $proc, TableSelection $select)
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
select(TableSelection $select)
setSelectableColumns(string ... $names)