19declare(strict_types=1);
50 $this->
lng = $DIC->language();
51 $this->ui_factory =
$DIC->ui()->factory();
52 $this->ui_renderer =
$DIC->ui()->renderer();
53 $this->request =
$DIC->http()->request();
58 array $visible_column_ids,
61 mixed $additional_viewcontrol_data,
63 mixed $additional_parameters
70 foreach ($this->records as $record) {
71 $record[
'icon'] = $record[
'icon'] ??
"lti";
72 $record[
'icon'] = $this->ui_factory->symbol()->icon()->standard($record[
'icon'], $record[
'icon'], Icon::SMALL);
79 $record[
'used_by'] = $this->ui_factory->link()->standard(
80 $record[
'usedByTitle'],
84 yield $row_builder->
buildDataRow((
string) $record[
'id'], $record);
89 mixed $additional_viewcontrol_data,
91 mixed $additional_parameters
93 return count($this->records);
98 $this->records =
$data;
103 $table = $this->ui_factory->table()
104 ->data($this->
lng->txt(
'tbl_provider_usage_header'), $this->getColumns(), $this)
105 ->withOrder(
new Order(
'title', Order::ASC))
106 ->withRequest($this->request);
108 return $this->ui_renderer->render($table);
114 "icon" => $this->ui_factory->table()->column()->statusIcon($this->
lng->txt(
'tbl_lti_prov_icon')),
115 "title" => $this->ui_factory->table()->column()->text($this->
lng->txt(
'tbl_lti_prov_title')),
116 "usedByIsTrashed" => $this->ui_factory->table()->column()->boolean(
117 $this->
lng->txt(
'tbl_lti_prov_usages_trashed'),
118 $this->ui_factory->symbol()->icon()->custom(
'assets/images/standard/icon_ok.svg', $this->lng->txt(
'icon_ok'), Icon::SMALL),
119 $this->ui_factory->symbol()->icon()->custom(
'assets/images/standard/icon_not_ok.svg', $this->lng->txt(
'icon_not_ok'), Icon::SMALL)
121 "used_by" => $this->ui_factory->table()->column()->link($this->
lng->txt(
'tbl_lti_prov_used_by'))
Builds a Color from either hex- or rgb values.
Both the subject and the direction need to be specified when expressing an order.
A simple class to express a naive range of whole positive numbers.
ILIAS UI Renderer $ui_renderer
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...
static _lookupType(int $id, bool $reference=false)
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This describes how an icon could be modified during construction of UI.
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....
buildDataRow(string $id, array $record)
This is how the factory for UI elements looks.