3 declare(strict_types=1);
34 protected \ilLanguage
$lng;
44 $this->
lng = $DIC->language();
45 $this->ui_fac = $DIC->ui()->factory();
46 $this->request = $DIC->http()->request();
56 $table = $this->ui_fac->table()
57 ->data($this->
lng->txt(
"glo_term_definition_pairs"), $columns, $data_retrieval)
60 $this->glossary->getRefId()
62 ->withRequest($this->request);
70 "term" => $this->ui_fac->table()->column()->text($this->
lng->txt(
"cont_term"))
71 ->withIsSortable(
false),
72 "definition" => $this->ui_fac->table()->column()->text($this->
lng->txt(
"cont_definition"))
73 ->withIsSortable(
false)
81 $data_retrieval =
new class (
90 protected string $raw_data,
95 $this->term_manager = $DIC->glossary()->internal()->domain()->term($this->glossary);
98 public function getRows(
100 array $visible_column_ids,
104 ?array $additional_parameters
106 $records = $this->getRecords($range);
107 foreach ($records as $idx => $record) {
108 $row_id = (string) $record[
"id"];
110 yield $row_builder->buildDataRow($row_id, $record);
114 public function getTotalRowCount(
116 ?array $additional_parameters
118 return count($this->getRecords());
121 protected function getRecords(
Data\
Range $range = null): array
123 $data = $this->term_manager->getDataArrayFromInputString($this->raw_data);
127 foreach (
$data as $pair) {
128 $records[$i][
"id"] = $i + 1;
129 $records[$i][
"term"] = $pair[
"term"];
130 $records[$i][
"definition"] = $pair[
"definition"];
136 $records = $this->limitRecords($records, $range);
143 return $data_retrieval;
ServerRequestInterface $request
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...
Both the subject and the direction need to be specified when expressing an order. ...
__construct(string $raw_data, \ilObjGlossary $glossary)
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...
A simple class to express a naive range of whole positive numbers.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...