ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\ObjectGroup\Objects\Table\ObjectsTable Class Reference
+ Inheritance diagram for ILIAS\ObjectGroup\Objects\Table\ObjectsTable:
+ Collaboration diagram for ILIAS\ObjectGroup\Objects\Table\ObjectsTable:

Public Member Functions

 __construct (private readonly ilCtrlInterface $ctrl, private readonly ilLanguage $lng, private readonly ilGlobalTemplateInterface $tpl, private readonly UIFactory $ui_factory, private readonly UIRenderer $ui_renderer, private readonly HttpServices $http, private readonly Refinery $refinery, private readonly int $object_group_ref_id, private readonly int $object_group_obj_id,)
 
 getComponent (URLBuilder $url_builder)
 
 getComponents (URLBuilder $url_builder)
 
 execute (URLBuilder $url_builder)
 
 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 records available. More...
 
 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.g. More...
 
 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.g. More...
 
 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 records available. More...
 

Data Fields

const string ID = 'obgr_objects'
 
const string ROW_ID_PARAMETER = 'object_ref_id'
 
const string ACTION_PARAMETER = 'action'
 
const string ACTION_ASSIGN = 'assign'
 
const string ACTION_UNASSIGN = 'unassign'
 
const string LIST_MATERIALS_COMMAND = 'listMaterials'
 

Private Member Functions

 getColumns ()
 
 getActions (URLBuilder $url_builder)
 
 acquireParameters (URLBuilder $url_builder)
 
 loadRecords ()
 
 buildTitleCell (array $record)
 
 buildOtherAssignmentLinks (array $other_object_groups)
 
 sortRecords (Order $order, array $records)
 
 limitRecords (Range $range, array $records)
 
 assignItems (array $selected_ref_ids)
 
 unassignItems (array $selected_ref_ids)
 
 resolveSelectedRefIds (string $key)
 
 resolveParameter (string $key)
 
 resolveRawParameter (string $key)
 
 isAllObjectsSelection (mixed $value)
 
 getAssignableRefIds ()
 

Private Attributes

const string ALL_OBJECTS = 'ALL_OBJECTS'
 
readonly ilObjectGroupItems $object_group_items
 
array $records = null
 

Detailed Description

Definition at line 45 of file ObjectsTable.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::__construct ( private readonly ilCtrlInterface  $ctrl,
private readonly ilLanguage  $lng,
private readonly ilGlobalTemplateInterface  $tpl,
private readonly UIFactory  $ui_factory,
private readonly UIRenderer  $ui_renderer,
private readonly HttpServices  $http,
private readonly Refinery  $refinery,
private readonly int  $object_group_ref_id,
private readonly int  $object_group_obj_id 
)

Definition at line 68 of file ObjectsTable.php.

78 {
79 $this->object_group_items = new ilObjectGroupItems($this->object_group_ref_id);
80 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Member Function Documentation

◆ acquireParameters()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::acquireParameters ( URLBuilder  $url_builder)
private
Returns
array{URLBuilder, URLBuilderToken, URLBuilderToken}

Definition at line 248 of file ObjectsTable.php.

248 : array
249 {
250 return $url_builder->acquireParameters(
251 [self::ID],
252 self::ROW_ID_PARAMETER,
253 self::ACTION_PARAMETER
254 );
255 }
acquireParameters(array $namespace, string ... $names)
Definition: URLBuilder.php:138

References ILIAS\UI\URLBuilder\acquireParameters().

Referenced by ILIAS\ObjectGroup\Objects\Table\ObjectsTable\execute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assignItems()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::assignItems ( array  $selected_ref_ids)
private
Parameters
list<int>$selected_ref_ids

Definition at line 377 of file ObjectsTable.php.

377 : void
378 {
379 foreach ($selected_ref_ids as $ref_id) {
380 $this->object_group_items->addItem($ref_id);
381 }
382
383 $this->object_group_items->update();
384 }

Referenced by ILIAS\ObjectGroup\Objects\Table\ObjectsTable\execute().

+ Here is the caller graph for this function:

◆ buildOtherAssignmentLinks()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::buildOtherAssignmentLinks ( array  $other_object_groups)
private
Parameters
array<int,string>$other_object_groups
Returns
list<\ILIAS\UI\Component\Link\Link>

Definition at line 315 of file ObjectsTable.php.

315 : array
316 {
317 $links = [];
318
319 foreach ($other_object_groups as $ref_id => $title) {
320 $this->ctrl->setParameterByClass(ilObjObjectGroupGUI::class, 'ref_id', $ref_id);
321 $links[] = $this->ui_factory->link()->standard(
322 $title,
323 $this->ctrl->getLinkTargetByClass(ilObjObjectGroupGUI::class, self::LIST_MATERIALS_COMMAND)
324 );
325 }
326
327 $this->ctrl->clearParameterByClass(ilObjObjectGroupGUI::class, 'ref_id');
328
329 return $links;
330 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ buildTitleCell()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::buildTitleCell ( array  $record)
private
Parameters
array{ref_idint, obj_id: int, title: string, is_assigned: bool, other_assignments: \ILIAS\UI\Component\Listing\Unordered, sort_key: string} $record

Definition at line 299 of file ObjectsTable.php.

299 : string
300 {
301 $icon = $this->ui_renderer->render(
302 $this->ui_factory->symbol()->icon()->custom(
303 ilObject::_getIcon($record['obj_id'], 'tiny'),
304 $record['title']
305 )
306 );
307
308 return "{$icon} {$record['title']}";
309 }
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.

References ilObject\_getIcon().

+ Here is the call graph for this function:

◆ execute()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::execute ( URLBuilder  $url_builder)

Definition at line 100 of file ObjectsTable.php.

100 : void
101 {
102 [, $row_id_token, $action_token] = $this->acquireParameters($url_builder);
103
104 if (
105 !$this->http->wrapper()->query()->has($action_token->getName())
106 && !$this->http->wrapper()->post()->has($action_token->getName())
107 ) {
108 $this->ctrl->redirectByClass(ilObjObjectGroupGUI::class, self::LIST_MATERIALS_COMMAND);
109 }
110
111 $action = (string) $this->resolveParameter($action_token->getName());
112 $selected_ref_ids = $this->resolveSelectedRefIds($row_id_token->getName());
113
114 if ($selected_ref_ids === []) {
115 $this->tpl->setOnScreenMessage(
117 $this->lng->txt('select_one'),
118 true
119 );
120 $this->ctrl->redirectByClass(ilObjObjectGroupGUI::class, self::LIST_MATERIALS_COMMAND);
121 }
122
123 $selected_ref_ids = array_values(
124 array_intersect(
125 $selected_ref_ids,
126 $this->getAssignableRefIds()
127 )
128 );
129
130 if ($selected_ref_ids === []) {
131 $this->ctrl->redirectByClass(ilObjObjectGroupGUI::class, self::LIST_MATERIALS_COMMAND);
132 }
133
134 if (!in_array($action, [self::ACTION_ASSIGN, self::ACTION_UNASSIGN], true)) {
135 $this->ctrl->redirectByClass(ilObjObjectGroupGUI::class, self::LIST_MATERIALS_COMMAND);
136 }
137
138 match ($action) {
139 self::ACTION_ASSIGN => $this->assignItems($selected_ref_ids),
140 self::ACTION_UNASSIGN => $this->unassignItems($selected_ref_ids),
141 default => null,
142 };
143
144 $this->tpl->setOnScreenMessage(
146 $this->lng->txt('msg_obj_modified'),
147 true
148 );
149 $this->ctrl->redirectByClass(ilObjObjectGroupGUI::class, self::LIST_MATERIALS_COMMAND);
150 }
static http()
Fetches the global http state from ILIAS.

References ILIAS\ObjectGroup\Objects\Table\ObjectsTable\acquireParameters(), ILIAS\ObjectGroup\Objects\Table\ObjectsTable\assignItems(), ILIAS\Repository\ctrl(), ILIAS\ObjectGroup\Objects\Table\ObjectsTable\getAssignableRefIds(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\UICore\GlobalTemplate\MESSAGE_TYPE_FAILURE, ILIAS\UICore\GlobalTemplate\MESSAGE_TYPE_SUCCESS, ILIAS\ObjectGroup\Objects\Table\ObjectsTable\resolveParameter(), ILIAS\ObjectGroup\Objects\Table\ObjectsTable\resolveSelectedRefIds(), and ILIAS\ObjectGroup\Objects\Table\ObjectsTable\unassignItems().

+ Here is the call graph for this function:

◆ getActions()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::getActions ( URLBuilder  $url_builder)
private
Returns
array<string, \ILIAS\UI\Component\Table\Action\Action>

Definition at line 226 of file ObjectsTable.php.

226 : array
227 {
228 $action_factory = $this->ui_factory->table()->action();
229 [$url_builder, $row_id_token, $action_token] = $this->acquireParameters($url_builder);
230
231 return [
232 self::ACTION_ASSIGN => $action_factory->standard(
233 $this->lng->txt('obgr_assign'),
234 $url_builder->withParameter($action_token, self::ACTION_ASSIGN),
235 $row_id_token
236 ),
237 self::ACTION_UNASSIGN => $action_factory->standard(
238 $this->lng->txt('obgr_unassign'),
239 $url_builder->withParameter($action_token, self::ACTION_UNASSIGN),
240 $row_id_token
241 ),
242 ];
243 }
withParameter(URLBuilderToken $token, string|array $value)
Change an acquired parameter's value if the supplied token is valid.
Definition: URLBuilder.php:166

References ILIAS\Repository\lng(), and ILIAS\UI\URLBuilder\withParameter().

Referenced by ILIAS\ObjectGroup\Objects\Table\ObjectsTable\getComponent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAssignableRefIds()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::getAssignableRefIds ( )
private
Returns
list<int>

Definition at line 471 of file ObjectsTable.php.

471 : array
472 {
473 return array_values(array_filter(
474 array_map(
475 static fn(array $item): int => (int) ($item['child'] ?? $item['ref_id'] ?? 0),
476 $this->object_group_items->getAssignableItems()
477 ),
478 static fn(int $ref_id): bool => $ref_id > 0
479 ));
480 }

Referenced by ILIAS\ObjectGroup\Objects\Table\ObjectsTable\execute().

+ Here is the caller graph for this function:

◆ getColumns()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::getColumns ( )
private
Returns
array<string, Column>

Definition at line 194 of file ObjectsTable.php.

194 : array
195 {
196 $column_factory = $this->ui_factory->table()->column();
197 $icon_factory = $this->ui_factory->symbol()->icon();
198
199 return [
200 'title' => $column_factory->text($this->lng->txt('obgr_item'))->withIsSortable(true),
201 'is_assigned' => $column_factory->boolean(
202 $this->lng->txt('obgr_assignment'),
203 $icon_factory->custom(
204 ilUtil::getImagePath('standard/icon_ok.svg'),
205 $this->lng->txt('yes')
206 ),
207 $icon_factory->custom(
208 ilUtil::getImagePath('standard/icon_not_ok.svg'),
209 $this->lng->txt('no')
210 )
211 )
212 ->withIsSortable(true)
213 ->withOrderingLabels(
214 $this->lng->txt('obgr_assigned_first'),
215 $this->lng->txt('obgr_unassigned_first')
216 ),
217 'other_assignments' => $column_factory
218 ->listing($this->lng->txt('obgr_assignment_to_other_obgr'))
219 ->withIsSortable(false),
220 ];
221 }
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)

References ilUtil\getImagePath(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getComponent()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::getComponent ( URLBuilder  $url_builder)

Definition at line 82 of file ObjectsTable.php.

82 : Data
83 {
84 return $this->ui_factory->table()
85 ->data($this, $this->lng->txt('obgr_assigned_materials'), $this->getColumns())
86 ->withActions($this->getActions($url_builder))
87 ->withOrder(new Order('is_assigned', Order::ASC))
88 ->withRequest($this->http->request())
89 ->withId(self::ID);
90 }
Both the subject and the direction need to be specified when expressing an order.
Definition: Order.php:29

References ILIAS\Data\Order\ASC, ILIAS\ObjectGroup\Objects\Table\ObjectsTable\getActions(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\UI\Component\Table\Data\withActions().

Referenced by ILIAS\ObjectGroup\Objects\Table\ObjectsTable\getComponents().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getComponents()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::getComponents ( URLBuilder  $url_builder)
Returns
array<Component>

Definition at line 95 of file ObjectsTable.php.

95 : array
96 {
97 return [$this->getComponent($url_builder)];
98 }

References ILIAS\ObjectGroup\Objects\Table\ObjectsTable\getComponent().

+ Here is the call graph for this function:

◆ getRows()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::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.g.

yield $row_builder->buildStandardRow($row_id, $record).

Parameters
string[]$visible_column_ids

Implements ILIAS\UI\Component\Table\DataRetrieval.

Definition at line 160 of file ObjectsTable.php.

168 : Generator {
169 $records = $this->limitRecords(
170 $range,
171 $this->sortRecords(
172 $order,
173 $this->loadRecords()
174 )
175 );
176
177 foreach ($records as $record) {
178 $row = $row_builder->buildDataRow(
179 (string) $record['ref_id'],
180 [
181 'title' => $this->buildTitleCell($record),
182 'is_assigned' => $record['is_assigned'],
183 'other_assignments' => $record['other_assignments'],
184 ]
185 );
186
187 yield $row->withDisabledAction($record['is_assigned'] ? self::ACTION_ASSIGN : self::ACTION_UNASSIGN);
188 }
189 }
sortRecords(Order $order, array $records)
limitRecords(Range $range, array $records)
buildDataRow(string $id, array $record)

References ILIAS\UI\Component\Table\DataRowBuilder\buildDataRow().

+ Here is the call graph for this function:

◆ getTotalRowCount()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::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 records available.

Given the nature of a DataTable, which is, opposite to a PresentationTable, rather administrative than explorative, this information will increase user experience quite a bit. However, you may return null, if the call is to costly, but expect the View Control to look a little different in this case.

Make sure that potential filters or user restrictions are being applied to the count.

Implements ILIAS\UI\Component\Table\DataRetrieval.

Definition at line 152 of file ObjectsTable.php.

156 : ?int {
157 return count($this->loadRecords());
158 }

◆ isAllObjectsSelection()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::isAllObjectsSelection ( mixed  $value)
private

Definition at line 463 of file ObjectsTable.php.

463 : bool
464 {
465 return $value === self::ALL_OBJECTS || ($value[0] ?? null) === self::ALL_OBJECTS;
466 }

◆ limitRecords()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::limitRecords ( Range  $range,
array  $records 
)
private
Parameters
list<array{ref_idint, obj_id: int, title: string, is_assigned: bool, other_assignments: \ILIAS\UI\Component\Listing\Unordered, sort_key: string}> $records
Returns
list<array{ref_id: int, obj_id: int, title: string, is_assigned: bool, other_assignments: \ILIAS\UI\Component\Listing\Unordered, sort_key: string}>

Definition at line 369 of file ObjectsTable.php.

369 : array
370 {
371 return array_slice($records, $range->getStart(), $range->getLength());
372 }

References ILIAS\UI\Implementation\Component\Table\$range, ILIAS\Data\Range\getLength(), and ILIAS\Data\Range\getStart().

+ Here is the call graph for this function:

◆ loadRecords()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::loadRecords ( )
private
Returns
list<array{ref_id: int, obj_id: int, title: string, is_assigned: bool, other_assignments: \ILIAS\UI\Component\Listing\Unordered, sort_key: string}>

Definition at line 260 of file ObjectsTable.php.

260 : array
261 {
262 if ($this->records !== null) {
263 return $this->records;
264 }
265
266 $assigned_items = $this->object_group_items->getValidItems();
267 $records = [];
268
269 foreach ($this->object_group_items->getAssignableItems() as $item) {
270 $ref_id = (int) ($item['child'] ?? $item['ref_id'] ?? 0);
271 if ($ref_id === 0) {
272 continue;
273 }
274
275 $is_assigned = in_array($ref_id, $assigned_items, true);
277 $ref_id,
278 $this->object_group_obj_id
279 );
280
281 $records[] = [
282 'ref_id' => $ref_id,
283 'obj_id' => (int) ($item['obj_id'] ?? 0),
284 'title' => (string) ($item['title'] ?? ''),
285 'is_assigned' => $is_assigned,
286 'other_assignments' => $this->ui_factory->listing()->unordered(
287 $this->buildOtherAssignmentLinks($other_object_groups)
288 ),
289 'sort_key' => (int) !$is_assigned . ($item['title'] ?? ''),
290 ];
291 }
292
293 return $this->records = $records;
294 }
buildOtherAssignmentLinks(array $other_object_groups)
static getObjectGroupsAssociatedWithItem(int $ref_id, int $filter_object_group_id=0)

References ilObjectGroupItems\getObjectGroupsAssociatedWithItem(), and ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ resolveParameter()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::resolveParameter ( string  $key)
private

Definition at line 423 of file ObjectsTable.php.

423 : mixed
424 {
425 $wrapper = $this->http->wrapper();
426 $transformation = $this->refinery->byTrying([
427 $this->refinery->kindlyTo()->int(),
428 $this->refinery->kindlyTo()->string(),
429 $this->refinery->custom()->transformation(
430 static fn(array $value): string|int|array => count($value) === 1 ? $value[0] : $value
431 ),
432 ]);
433
434 if ($wrapper->post()->has($key)) {
435 return $wrapper->post()->retrieve($key, $transformation);
436 }
437
438 if ($wrapper->query()->has($key)) {
439 return $wrapper->query()->retrieve($key, $transformation);
440 }
441
442 return null;
443 }

References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

Referenced by ILIAS\ObjectGroup\Objects\Table\ObjectsTable\execute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolveRawParameter()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::resolveRawParameter ( string  $key)
private

Definition at line 445 of file ObjectsTable.php.

445 : mixed
446 {
447 $wrapper = $this->http->wrapper();
448 $transformation = $this->refinery->identity();
449
450 $post_wrapper = $wrapper->post();
451 if ($post_wrapper->has($key)) {
452 return $post_wrapper->retrieve($key, $transformation);
453 }
454
455 $query_wrapper = $wrapper->query();
456 if ($query_wrapper->has($key)) {
457 return $query_wrapper->retrieve($key, $transformation);
458 }
459
460 return null;
461 }

References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ resolveSelectedRefIds()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::resolveSelectedRefIds ( string  $key)
private
Returns
list<int>

Definition at line 405 of file ObjectsTable.php.

405 : array
406 {
407 $value = $this->resolveRawParameter($key);
408 if ($value === null || $value === '') {
409 return [];
410 }
411
412 if ($this->isAllObjectsSelection($value)) {
413 return $this->getAssignableRefIds();
414 }
415
416 if (!is_array($value)) {
417 return [(int) $value];
418 }
419
420 return array_values(array_map(static fn(mixed $id): int => (int) $id, $value));
421 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $id, and ILIAS\Repository\int().

Referenced by ILIAS\ObjectGroup\Objects\Table\ObjectsTable\execute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sortRecords()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::sortRecords ( Order  $order,
array  $records 
)
private
Parameters
list<array{ref_idint, obj_id: int, title: string, is_assigned: bool, other_assignments: \ILIAS\UI\Component\Listing\Unordered, sort_key: string}> $records
Returns
list<array{ref_id: int, obj_id: int, title: string, is_assigned: bool, other_assignments: \ILIAS\UI\Component\Listing\Unordered, sort_key: string}>

Definition at line 336 of file ObjectsTable.php.

336 : array
337 {
338 $order_data = $order->get();
339 if ($order_data === []) {
340 usort(
341 $records,
342 static fn(array $a, array $b): int => strcmp($a['sort_key'], $b['sort_key'])
343 );
344 return $records;
345 }
346
347 foreach ($order_data as $key => $value) {
348 $order_direction = $value === Order::DESC ? -1 : 1;
349 $callable = match ($key) {
350 'title' => static fn(array $a, array $b): int => strcmp($a['title'], $b['title']) * $order_direction,
351 'is_assigned' => static fn(array $a, array $b): int => (($a['is_assigned'] ?? false) <=> ($b['is_assigned'] ?? false)) * -$order_direction,
352 default => null,
353 };
354
355 if ($callable === null) {
356 continue;
357 }
358
359 usort($records, $callable);
360 }
361
362 return $records;
363 }
const DESC
Definition: Order.php:31
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples

References Vendor\Package\$a, Vendor\Package\$b, and ILIAS\Data\Order\get().

+ Here is the call graph for this function:

◆ unassignItems()

ILIAS\ObjectGroup\Objects\Table\ObjectsTable::unassignItems ( array  $selected_ref_ids)
private
Parameters
list<int>$selected_ref_ids

Definition at line 389 of file ObjectsTable.php.

389 : void
390 {
391 $this->object_group_items->setItems(
392 array_values(
393 array_diff(
394 $this->object_group_items->getItems(),
395 $selected_ref_ids
396 )
397 )
398 );
399 $this->object_group_items->update();
400 }

Referenced by ILIAS\ObjectGroup\Objects\Table\ObjectsTable\execute().

+ Here is the caller graph for this function:

Field Documentation

◆ $object_group_items

readonly ilObjectGroupItems ILIAS\ObjectGroup\Objects\Table\ObjectsTable::$object_group_items
private

Definition at line 61 of file ObjectsTable.php.

◆ $records

array ILIAS\ObjectGroup\Objects\Table\ObjectsTable::$records = null
private

Definition at line 66 of file ObjectsTable.php.

◆ ACTION_ASSIGN

const string ILIAS\ObjectGroup\Objects\Table\ObjectsTable::ACTION_ASSIGN = 'assign'

Definition at line 53 of file ObjectsTable.php.

◆ ACTION_PARAMETER

const string ILIAS\ObjectGroup\Objects\Table\ObjectsTable::ACTION_PARAMETER = 'action'

Definition at line 51 of file ObjectsTable.php.

◆ ACTION_UNASSIGN

const string ILIAS\ObjectGroup\Objects\Table\ObjectsTable::ACTION_UNASSIGN = 'unassign'

Definition at line 55 of file ObjectsTable.php.

◆ ALL_OBJECTS

const string ILIAS\ObjectGroup\Objects\Table\ObjectsTable::ALL_OBJECTS = 'ALL_OBJECTS'
private

Definition at line 59 of file ObjectsTable.php.

◆ ID

const string ILIAS\ObjectGroup\Objects\Table\ObjectsTable::ID = 'obgr_objects'

Definition at line 47 of file ObjectsTable.php.

◆ LIST_MATERIALS_COMMAND

const string ILIAS\ObjectGroup\Objects\Table\ObjectsTable::LIST_MATERIALS_COMMAND = 'listMaterials'

Definition at line 57 of file ObjectsTable.php.

◆ ROW_ID_PARAMETER

const string ILIAS\ObjectGroup\Objects\Table\ObjectsTable::ROW_ID_PARAMETER = 'object_ref_id'

Definition at line 49 of file ObjectsTable.php.


The documentation for this class was generated from the following file: