19declare(strict_types=1);
25use Psr\Http\Message\ServerRequestInterface;
35 private readonly ServerRequestInterface
$request;
47 $this->request =
$http->request();
48 $this->data_factory =
new Data\Factory();
56 return $this->ui_factory
61 $this->
lng->txt(
'mail_members_of_mailing_list'),
62 $this->mailing_list->getTitle()
66 ->withId(str_replace(
'\\',
'', self::class) .
'_' . $this->mailing_list->getId())
68 ->withRange(
new Range(0, 50))
69 ->withActions($actions)
70 ->withRequest($this->request);
79 'login' => $this->ui_factory
82 ->text($this->
lng->txt(
'login'))
83 ->withIsSortable(
true),
92 $query_params_namespace = [
'contact',
'mailinglist',
'members'];
94 $uri = $this->data_factory->uri(
95 ILIAS_HTTP_PATH .
'/' . $this->
ctrl->getLinkTargetByClass(
96 ilMailingListsGUI::class,
97 'handleMailingListMemberActions'
101 $url_builder =
new UI\URLBuilder($uri);
104 $action_parameter_token_copy,
106 ] = $url_builder->acquireParameters(
107 $query_params_namespace,
113 'confirmDeleteMembers' => $this->ui_factory->table()->action()->multi(
114 $this->
lng->txt(
'remove'),
115 $url_builder->withParameter($action_parameter_token_copy,
'confirmDeleteMembers'),
123 if ($this->records ===
null) {
126 $entries = $this->mailing_list->getAssignedEntries();
127 if ($entries !== []) {
128 $usr_ids = array_map(
static fn(array $entry):
int => (
int) $entry[
'usr_id'], $entries);
131 foreach ($entries as $entry) {
132 $this->records[$i][
'a_id'] = $entry[
'a_id'];
133 $this->records[$i][
'user_id'] = $entry[
'usr_id'];
134 $this->records[$i][
'login'] = $names[$entry[
'usr_id']];
143 array $visible_column_ids,
146 mixed $additional_viewcontrol_data,
148 mixed $additional_parameters
153 $row_id = (string) $record[
'a_id'];
154 yield $row_builder->buildDataRow($row_id, $record);
159 mixed $additional_viewcontrol_data,
161 mixed $additional_parameters
163 $this->initRecords();
165 return \count($this->records);
173 $records = $this->records;
174 [$order_field, $order_direction] = $order->join([], fn($ret, $key, $value) => [$key, $value]);
184 $this->initRecords();
186 $records = $this->sortedRecords($order);
188 return $this->limitRecords($records,
$range);
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static stableSortArray(array $array, string $a_array_sortby, string $a_array_sortorder="asc", bool $a_numeric=false)
Sort an aray using a stable sort algorithm, which preveserves the sequence of array elements which ha...
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path=null)
Default behaviour is:
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...
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.