19 declare(strict_types=1);
33 protected \ilLanguage
$lng;
36 protected Data\Factory
$df;
44 $this->
ctrl = $DIC->ctrl();
45 $this->
lng = $DIC->language();
46 $this->ui_fac = $DIC->ui()->factory();
47 $this->request = $DIC->http()->request();
48 $this->df =
new Data\Factory();
59 $table = $this->ui_fac->table()
62 $this->foreign_glossary->getTitle() .
": " .$this->lng->txt(
"glo_select_terms"),
67 $this->glossary->getRefId() .
"_" .
68 $this->foreign_glossary->getRefId()
70 ->withActions($actions)
71 ->withRequest($this->request);
79 "title" => $this->ui_fac->table()->column()->text($this->
lng->txt(
"glo_term"))
80 ->withIsSortable(
false)
88 $query_params_namespace = [
"glo_foreign_term_table"];
90 $uri_copy = $this->df->uri(
91 ILIAS_HTTP_PATH .
"/" . $this->
ctrl->getLinkTargetByClass(
"ilglossaryforeigntermcollectorgui",
"copyTerms")
93 $url_builder_copy =
new UI\URLBuilder($uri_copy);
94 list($url_builder_copy, $action_parameter_token_copy, $row_id_token_copy) =
95 $url_builder_copy->acquireParameters(
96 $query_params_namespace,
101 $uri_reference = $this->df->uri(
102 ILIAS_HTTP_PATH .
"/" . $this->
ctrl->getLinkTargetByClass(
"ilglossaryforeigntermcollectorgui",
"referenceTerms")
104 $url_builder_reference =
new UI\URLBuilder($uri_reference);
105 list($url_builder_reference, $action_parameter_token_reference, $row_id_token_reference) =
106 $url_builder_reference->acquireParameters(
107 $query_params_namespace,
113 "copy" => $this->ui_fac->table()->action()->multi(
114 $this->
lng->txt(
"glo_copy_terms"),
115 $url_builder_copy->withParameter($action_parameter_token_copy,
"copyTerms"),
118 "reference" => $this->ui_fac->table()->action()->multi(
119 $this->
lng->txt(
"glo_reference_terms"),
120 $url_builder_reference->withParameter($action_parameter_token_reference,
"referenceTerms"),
121 $row_id_token_reference
130 $data_retrieval =
new class (
140 public function getRows(
142 array $visible_column_ids,
146 ?array $additional_parameters
148 $records = $this->getRecords($range);
149 foreach ($records as $idx => $record) {
150 $row_id = (string) $record[
"term_id"];
152 yield $row_builder->buildDataRow($row_id, $record);
156 public function getTotalRowCount(
158 ?array $additional_parameters
160 return count($this->getRecords());
163 protected function getRecords(?
Data\
Range $range =
null): array
167 foreach ($this->foreign_glossary->getTermList() as $term) {
168 $records[$i][
"term_id"] = $term[
"id"];
169 $records[$i][
"title"] = $term[
"term"];
174 $records = $this->limitRecords($records, $range);
181 return $data_retrieval;
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. ...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilObjGlossary $foreign_glossary
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ServerRequestInterface $request
__construct(\ilObjGlossary $glossary, \ilObjGlossary $foreign_glossary)
A simple class to express a naive range of whole positive numbers.