19declare(strict_types=1);
52 public readonly
string $reset_command,
53 private readonly
string $auto_complete_link,
54 private readonly
UI $ui,
56 private readonly Closure $create,
65 'created' => [$this->
ui->txt(
'tbl_hist_head_acceptance_date'),
'created'],
66 'login' => [$this->
ui->txt(
'tbl_hist_head_login'),
'login'],
67 'firstname' => [$this->
ui->txt(
'tbl_hist_head_firstname'),
'firstname'],
68 'lastname' => [$this->
ui->txt(
'tbl_hist_head_lastname'),
'lastname'],
69 'document' => [$this->
ui->txt(
'tbl_hist_head_document'),
'document'],
70 'criteria' => [$this->
ui->txt(
'tbl_hist_head_criteria')],
76 $config->
setTitle($this->
ui->txt(
'acceptance_history'));
81 $filter = $config->
asFilter($this->reset_command);
82 $filter->addFilterItem($this->
userName());
83 $filter->addFilterItem($this->
time(),
true);
88 $filter = $selection->
filter();
89 $period = $filter[
'period'] ?? [];
90 unset($filter[
'period']);
91 $filter = array_filter([...$filter, ...$period]);
110 $user = ($this->create)(ilObjUser::class, $record->
creation()->user());
114 'login' => $user?->getLogin() ?? $this->
ui->txt(
'deleted'),
115 'firstname' => $user?->getFirstname() ??
'-',
116 'lastname' => $user?->getLastname() ??
'-',
124 $ul = ($this->create)(ilTextInputGUI::class, join(
'/', array_map($this->
ui->txt(...), [
'login',
'email',
'name'])),
'query');
127 $ul->setSubmitFormOnEnter(
true);
133 class_exists(ilDateTime::class);
134 $duration = ($this->create)(ResettingDurationInputGUI::class, $this->
ui->txt(
'period'),
'period');
137 $duration->setStartText($this->
ui->txt(
'period_from'));
138 $duration->setEndText($this->
ui->txt(
'period_until'));
150 $conv = $this->document->toCondition(...);
154 $this->
ui->txt(
'tbl_hist_cell_not_criterion') :
__construct(private readonly HistoryRepository $repository, private readonly ProvideDocument $document, public readonly string $reset_command, private readonly string $auto_complete_link, private readonly UI $ui, private readonly DocumentModal $modal, private readonly Closure $create, ?Closure $format_date=null)
rows(TableSelection $selection)
config(TableConfig $config)
showCriteria(History $record)
readonly Closure $format_date
Class for date presentation.
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
@classDescription Date and time handling
This class represents a text property in a property form.
setDataSource(string $href, ?string $a_delimiter=null)
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
setDefaultOrderField(string $a_defaultorderfield)
setDefaultOrderDirection(string $a_defaultorderdirection)
asFilter(string $reset_command)
setSelectableColumns(string ... $names)
setMaxCount(int $a_max_count)
A component is the most general form of an entity in the UI.
modal(string $title="", string $cancel_label="")