19 declare(strict_types=1);
51 private readonly
int $server_id,
59 array $visible_column_ids,
63 ?array $additional_parameters,
66 foreach ($records as $record) {
67 yield $row_builder->buildDataRow((
string) $record[
'id'], $record);
73 if ($this->records ===
null) {
76 $mappings = $mapping_instance->getMappings();
77 foreach ($mappings as $item) {
78 $title = $this->object_data_cache->lookupTitle($this->rbac_review->getObjectOfRole((
int) $item[
'role']));
80 'id' => $item[
'mapping_id'],
82 'role' => $item[
'role_name'],
84 'url' => $item[
'url'],
85 'member_attribute' => $item[
'member_attribute'],
94 $query_params_namespace = [
'ldap',
'role',
'mapping'];
95 $table_uri = $this->data_factory->uri($this->http_request->getUri()->__toString());
97 [$url_builder, $action_parameter_token, $row_id_token] = $url_builder->acquireParameters(
98 $query_params_namespace,
103 return $this->ui_factory->table()
106 $this->
lng->txt(
'mail_templates'),
109 ->
withTitle($this->
lng->txt(
'ldap_role_group_assignments'))
110 ->withActions($this->
getActions($url_builder, $action_parameter_token, $row_id_token))
112 'ldap_role_mapping_table' 114 ->withOrder(
new Order(
'title', Order::DESC))
115 ->withRequest($this->http_request);
122 return count((array) $this->records);
158 $actions[
'delete'] = $this->ui_factory->table()->action()->multi(
159 $this->
lng->txt(
'delete'),
160 $url_builder->
withParameter($action_parameter_token,
'confirmDeleteRoleMapping'),
164 $actions[
'copy'] = $this->ui_factory->table()->action()->single(
165 $this->
lng->txt(
'copy'),
166 $url_builder->
withParameter($action_parameter_token,
'addRoleMapping'),
170 $actions[
'edit'] = $this->ui_factory->table()->action()->single(
171 $this->
lng->txt(
'edit'),
172 $url_builder->
withParameter($action_parameter_token,
'editRoleMapping'),
226 [$order_field, $order_direction] = $order->
join(
228 fn($ret, $key, $value) => [$key, $value]
230 usort($records,
static fn(array $left, array $right):
int =>
ilStr::strCmp(
231 $left[$order_field] ??
'',
232 $right[$order_field] ??
'' 235 if ($order_direction === Order::DESC) {
236 $records = array_reverse($records);
248 'title' => $this->ui_factory->table()->column()->text($this->
lng->txt(
'title')),
249 'role' => $this->ui_factory->table()->column()->text($this->
lng->txt(
'obj_role')),
250 'dn' => $this->ui_factory->table()->column()->text($this->
lng->txt(
'ldap_group_dn')),
251 'url' => $this->ui_factory->table()->column()->text($this->
lng->txt(
'ldap_server')),
252 'member_attribute' => $this->ui_factory->table()->column()->text($this->
lng->txt(
'ldap_group_member')),
253 'info' => $this->ui_factory->table()->column()->text($this->
lng->txt(
'ldap_info_text')),
orderRecords(array $records, Order $order)
join($init, callable $fn)
Interface Observer Contains several chained tasks and infos about them.
getTotalRowCount(?array $filter_data, ?array $additional_parameters)
Mainly for the purpose of pagination-support, it is important to know about the total number of recor...
getRows(ILIAS\UI\Component\Table\DataRowBuilder $row_builder, array $visible_column_ids, Range $range, Order $order, ?array $filter_data, ?array $additional_parameters,)
This is called by the table to retrieve rows; map data-records to rows using the $row_builder e...
Both the subject and the direction need to be specified when expressing an order. ...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static strCmp(string $a, string $b)
static _getInstanceByServerId(int $a_server_id)
Get instance of class.
withParameter(URLBuilderToken $token, string|array $value)
Change an acquired parameter's value if the supplied token is valid.
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
getRecords(Range $range, Order $order)
getActions(URLBuilder $url_builder, URLBuilderToken $action_parameter_token, URLBuilderToken $row_id_token)
A simple class to express a naive range of whole positive numbers.
__construct(private readonly ServerRequestInterface $http_request, private readonly ilLanguage $lng, private readonly UIFactory $ui_factory, private readonly DataFactory $data_factory, private readonly int $server_id, private readonly ilObjectDataCache $object_data_cache, private readonly ilRbacReview $rbac_review,)
limitRecords(array $records, Range $range)