19declare(strict_types=1);
52 $r =
$DIC[
'ui.renderer'];
58 $df = new \ILIAS\Data\Factory();
59 $request =
$DIC->http()->request();
66 'entry' =>
$f->table()->column()->text(
"some entry")
74 $url_builder =
new URLBuilder($df->uri($request->getUri()->__toString()));
75 $query_params_namespace = [
'orderingtable',
'example',
'large'];
76 list($url_builder, $action_parameter_token, $row_id_token) = $url_builder->acquireParameters(
77 $query_params_namespace,
79 "a_quiet_longish_parameter_name_to_quickly_exceed_url_limits"
82 $f->table()->action()->standard(
84 $url_builder->withParameter($action_parameter_token,
"edit"),
93 $data_retrieval =
new class (
$f, $r) implements
I\OrderingRetrieval {
94 protected array $records;
97 protected \
ILIAS\UI\Factory $ui_factory,
98 protected \
ILIAS\UI\Renderer $ui_renderer
100 $this->records = $this->initRecords();
103 public function getRows(
104 I\OrderingRowBuilder $row_builder,
105 array $visible_column_ids
107 $records = array_values($this->records);
108 foreach ($this->records as $position_index => $record) {
109 $row_id = (string) $record[
'id'];
110 yield $row_builder->buildOrderingRow($row_id, $record);
114 protected function initRecords(): array
117 foreach (array_map(
'strval', range(0, 9)) as $r) {
118 $id = str_repeat($r, 1000);
121 'entry' => substr(
$id, 0, 50),
130 public function setOrder(array $ordered): void
133 foreach ($ordered as
$id) {
134 $r[(string)
$id] = $this->records[(
string)
$id];
141 $target = (
new URI((
string) $request->getUri()))->withParameter(
'ordering_example', 4);
142 $table =
$f->table()->ordering($data_retrieval, $target,
'large ids ordering table', $columns)
143 ->withActions($actions)
144 ->withRequest($request);
147 if ($request->getMethod() ==
"POST"
151 if (
$data = $table->getData()) {
152 $out[] =
$f->legacy()->content(
'<pre>' . print_r(
$data,
true) .
'</pre>');
154 $data_retrieval->setOrder(
$data);
158 return $r->render(
$out);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
The scope of this class is split ilias-conform URI's into components.
__construct()
Constructor setup ILIAS global object @access public.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.