3 declare(strict_types=1);
33 $f = $DIC[
'ui.factory'];
38 $r = $DIC[
'ui.renderer'];
44 $df = new \ILIAS\Data\Factory();
45 $request = $DIC->http()->request();
52 'entry' =>
$f->table()->column()->text(
"some entry")
60 $url_builder =
new URLBuilder($df->uri($request->getUri()->__toString()));
61 $query_params_namespace = [
'orderingtable',
'example',
'large'];
62 list($url_builder, $action_parameter_token, $row_id_token) = $url_builder->acquireParameters(
63 $query_params_namespace,
65 "a_quiet_longish_parameter_name_to_quickly_exceed_url_limits" 68 $f->table()->action()->standard(
70 $url_builder->withParameter($action_parameter_token,
"edit"),
80 protected array $records;
83 protected \
ILIAS\
UI\Factory $ui_factory,
86 $this->records = $this->initRecords();
89 public function getRows(
90 I\OrderingRowBuilder $row_builder,
91 array $visible_column_ids
93 $records = array_values($this->records);
94 foreach ($this->records as $position_index => $record) {
95 $row_id = (string) $record[
'id'];
96 yield $row_builder->buildOrderingRow($row_id, $record);
100 protected function initRecords(): array
104 $id = str_repeat($r, 1000);
107 'entry' => substr(
$id, 0, 50),
116 public function setOrder(array $ordered): void
119 foreach ($ordered as
$id) {
120 $r[(string) $id] = $this->records[(
string)
$id];
127 $target = (
new URI((
string) $request->getUri()))->withParameter(
'ordering_example', 4);
128 $table =
$f->table()->ordering($data_retrieval, $target,
'large ids ordering table', $columns)
129 ->withActions($actions)
130 ->withRequest($request);
133 if ($request->getMethod() ==
"POST" 137 if (
$data = $table->getData()) {
138 $out[] =
$f->legacy(
'<pre>' . print_r(
$data,
true) .
'</pre>');
140 $data_retrieval->setOrder(
$data);
Interface Observer Contains several chained tasks and infos about them.
__construct()
Constructor setup ILIAS global object public.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins