19declare(strict_types=1);
33 private readonly UIFactory $ui_factory,
41 return $this->ui_factory->table()->data(
43 $this->
lng->txt(
'qpl_skl_sub_tab_usages'),
50 $column_factory = $this->ui_factory->table()->column();
53 'skill_title' => $column_factory->text($this->
lng->txt(
'qpl_qst_skl_usg_skill_col')),
54 'skill_path' => $column_factory->text($this->
lng->txt(
'tst_competence_tree')),
55 'num_assigns' => $column_factory->number($this->
lng->txt(
'qpl_qst_skl_usg_numq_col')),
56 'max_points' => $column_factory->number($this->
lng->txt(
'qpl_qst_skl_usg_sklpnt_col'))
60 public function collectRecords(?array $filter_data, ?array $additional_parameters): array
62 return $this->assignment_list->getUniqueAssignedSkills();
67 [$order_field, $order_direction] = $order->
join(
69 static fn(
string $index,
string $key,
string $value): array => [$key, $value]
74 static fn(array
$a, array
$b):
int => (
$a[$order_field] ??
'') <=> (
$b[$order_field] ??
'')
77 return $order_direction === $order::DESC ? array_reverse($records) : $records;
98 array $visible_column_ids,
101 mixed $additional_viewcontrol_data,
103 mixed $additional_parameters
105 foreach ($this->
getRecords($order,
$range, $filter_data, $additional_parameters) as $row_id => $record) {
106 yield $row_builder->
buildDataRow((
string) $row_id, $record);
111 mixed $additional_viewcontrol_data,
113 mixed $additional_parameters
115 return count($this->collectRecords($filter_data, $additional_parameters));
Builds a Color from either hex- or rgb values.
Both the subject and the direction need to be specified when expressing an order.
join($init, callable $fn)
A simple class to express a naive range of whole positive numbers.
limitRecords(array $records, Range $range)
getRows(DataRowBuilder $row_builder, array $visible_column_ids, Range $range, Order $order, mixed $additional_viewcontrol_data, mixed $filter_data, mixed $additional_parameters)
This is called by the table to retrieve rows; map data-records to rows using the $row_builder e....
orderRecords(array $records, Order $order)
__construct(private readonly UIFactory $ui_factory, private readonly \ilLanguage $lng, private readonly \ilAssQuestionSkillAssignmentList $assignment_list)
getTotalRowCount(mixed $additional_viewcontrol_data, mixed $filter_data, mixed $additional_parameters)
Mainly for the purpose of pagination-support, it is important to know about the total number of recor...
getRecords(Order $order, Range $range, ?array $filter_data, ?array $additional_parameters)
collectRecords(?array $filter_data, ?array $additional_parameters)
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
buildDataRow(string $id, array $record)
This describes a Data Table.
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples