38 $this->
lng = $DIC[
'lng'];
42 OrderingRowBuilder $row_builder,
43 array $visible_column_ids
46 foreach ($records as $idx => $record) {
47 $row_id = (string) $record[
'id'];
48 $field = $this->facade->fieldFactory()->findById($record[
'id']);
49 $record[
'data_type'] = $this->facade->translationFactory()->translate($field);
50 $record[
'is_standard_field'] = $field->isStandardField() ? $this->
lng->txt(
'standard') : $this->
lng->txt(
'custom');
51 yield $row_builder->buildOrderingRow($row_id, $record);
56 I\DataRowBuilder $row_builder,
57 array $visible_column_ids,
61 ?array $additional_parameters
64 foreach ($records as $idx => $record) {
65 $row_id = (string) $record[
'id'];
66 $field = $this->facade->fieldFactory()->findById($record[
'id']);
67 $record[
'data_type'] = $this->facade->translationFactory()->translate($field);
68 $record[
'is_standard_field'] = $field->isStandardField() ? $this->
lng->txt(
'standard') : $this->
lng->txt(
'custom');
69 yield $row_builder->buildDataRow($row_id, $record);
75 $records = $this->facade->fieldFactory()->filterAllFieldsForTypeAsArray($this->facade->type());
76 [$order_field, $order_direction] = $order->
join([], fn($ret, $key, $value): array => [$key, $value]);
77 usort($records, fn(
$a,
$b):
int =>
$a[$order_field] <=>
$b[$order_field]);
78 if ($order_direction ===
'DESC') {
79 return array_reverse($records);
86 ?array $additional_parameters
88 return count($this->facade->fieldFactory()->getAvailableFieldsForObjId($this->facade->iliasObjId()));
join($init, callable $fn)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getRows(OrderingRowBuilder $row_builder, array $visible_column_ids)
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. ...
getRows22(I\DataRowBuilder $row_builder, array $visible_column_ids, Range $range, Order $order, ?array $filter_data, ?array $additional_parameters)
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
getTotalRowCount(?array $filter_data, ?array $additional_parameters)
A simple class to express a naive range of whole positive numbers.
__construct(protected \ilBiblAdminFactoryFacadeInterface $facade)