ILIAS  release_8 Revision v8.24
DataRowBuilder.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
28{
29 protected bool $table_has_multiactions = false;
30
34 protected array $row_actions = [];
35
39 protected array $columns = [];
40
41 public function withMultiActionsPresent(bool $flag): self
42 {
43 $clone = clone $this;
44 $clone->table_has_multiactions = $flag;
45 return $clone;
46 }
47
51 public function withSingleActions(array $row_actions): self
52 {
53 $clone = clone $this;
54 $clone->row_actions = $row_actions;
55 return $clone;
56 }
60 public function withVisibleColumns(array $columns): self
61 {
62 $clone = clone $this;
63 $clone->columns = $columns;
64 return $clone;
65 }
66
70 public function buildDataRow(string $id, array $record): T\DataRow
71 {
72 return new DataRow(
73 $this->row_actions !== [],
74 $this->table_has_multiactions,
75 $this->columns,
76 $this->row_actions,
77 $id,
79 );
80 }
81}
ilDclBaseRecordModel $record
clone(ilDclStandardField $original_record)
A Column describes the form of presentation for a certain aspect of data, i.e.
Definition: Column.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...