3 declare(strict_types=1);
33 protected \ilLanguage
$lng;
53 $this->
lng = $DIC->language();
54 $this->tree = $DIC->repositoryTree();
55 $this->ui_fac = $DIC->ui()->factory();
56 $this->ui_ren = $DIC->ui()->renderer();
57 $this->request = $DIC->http()->request();
71 $table = $this->ui_fac->table()
72 ->data($this->
lng->txt(
"skmg_assigned_objects"), $columns, $data_retrieval)
75 $this->parent_obj::class .
"_" .
76 $this->skill_id .
"_" .
77 $this->tref_id .
"_" .
80 ->withRequest($this->request);
88 "type" => $this->ui_fac->table()->column()->statusIcon($this->
lng->txt(
"type"))
89 ->withIsSortable(
false),
90 "title" => $this->ui_fac->table()->column()->text($this->
lng->txt(
"title")),
91 "path" => $this->ui_fac->table()->column()->text($this->
lng->txt(
"path"))
92 ->withIsSortable(
false)
100 $data_retrieval =
new class (
114 protected array $objects
118 public function getRows(
120 array $visible_column_ids,
124 ?array $additional_parameters
126 $records = $this->getRecords($range, $order);
127 foreach ($records as $idx => $record) {
128 $row_id = (string) $record[
"obj_id"];
130 yield $row_builder->buildDataRow($row_id, $record);
134 public function getTotalRowCount(
136 ?array $additional_parameters
138 return count($this->getRecords());
141 protected function getRecords(
Data\
Range $range = null,
Data\
Order $order = null): array
145 foreach ($this->objects as $obj_id) {
147 $obj_ref_id = end($obj_ref_id);
153 $records[$i][
"obj_id"] = $obj_id;
157 $icon = $this->ui_fac->symbol()->icon()->standard(
159 $this->
lng->txt(
"icon") .
" " . $this->
lng->txt($obj_type),
162 $records[$i][
"type"] = $icon;
164 $obj_ref_id_parent = $this->tree->getParentId($obj_ref_id);
165 $path = new \ilPathGUI();
166 $records[$i][
"path"] =
$path->getPath($this->tree->getParentId($obj_ref_id_parent), $obj_ref_id);
172 $records = $this->orderRecords($records, $order);
176 $records = $this->limitRecords($records, $range);
183 return $data_retrieval;
An entity that renders components to a string output.
static _getAllReferences(int $id)
get all reference ids for object ID
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. ...
static _lookupTitle(int $obj_id)
__construct(object $parent_obj, array $objects, int $skill_id=0, int $tref_id=0, int $profile_id=0)
ServerRequestInterface $request
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupType(int $id, bool $reference=false)
A simple class to express a range of whole positive numbers.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...