19declare(strict_types=1);
39 $factory =
$DIC->ui()->factory();
43 $post_wrapper =
$DIC->http()->wrapper()->post();
46 $message =
'Are you sure you want to delete the following items?';
47 $ctrl->setParameterByClass(
'ilsystemstyledocumentationgui',
'modal_nr', 1);
48 $form_action = $ctrl->getFormActionByClass(
'ilsystemstyledocumentationgui');
49 $icon = $factory->image()->standard(
'./assets/images/standard/icon_crs.svg',
'');
52 $factory->modal()->interruptiveItem()->standard(
'10',
'Course 1', $icon,
'Some description text'),
53 $factory->modal()->interruptiveItem()->keyValue(
'20',
'Item Key',
'item value'),
54 $factory->modal()->interruptiveItem()->standard(
'30',
'Course 3', $icon,
'Last but not least, a description'),
55 $factory->modal()->interruptiveItem()->keyValue(
'50',
'Second Item Key',
'another item value'),
57 $modal = $factory->modal()->interruptive(
'My Title', $message, $form_action)->withAffectedItems($items);
58 $button = $factory->button()->standard(
'Show Modal',
'')
59 ->withOnClick($modal->getShowSignal());
61 $out = [$button, $modal];
65 $post_wrapper->has(
'interruptive_items') &&
68 $out[] = $post_wrapper->retrieve(
'interruptive_items',
$refinery->custom()->transformation(
69 static fn(array $item_keys):
Standard => $factory->panel()->standard(
71 $factory->legacy()->content(
'Number of items deleted: ' . count($item_keys))
This describes a Standard Dropdown.
This describes a Standard Panel.
show_modal_on_button_click()