6    $renderer = 
$DIC->ui()->renderer();
 
    7    $message = 
'Are you sure you want to delete the following items?';
 
    8    $form_action = 
$DIC->ctrl()->getFormActionByClass(
'ilsystemstyledocumentationgui');
 
    9    $icon = 
$factory->image()->standard(
'./templates/default/images/icon_crs.svg', 
'');
 
   11        ->withAffectedItems(array(
 
   12            $factory->modal()->interruptiveItem(10, 
'Course 1', $icon, 
'Some description text'),
 
   13            $factory->modal()->interruptiveItem(20, 
'Course 2', $icon, 
'Another description text'),
 
   14            $factory->modal()->interruptiveItem(30, 
'Course 3', $icon, 
'Last but not least, a description'),
 
   16    $button = 
$factory->button()->standard(
'Show Modal', 
'')
 
   17        ->withOnClick($modal->getShowSignal());
 
   21    if (isset(
$_POST[
'interruptive_items'])) {
 
   22        $panel = 
$factory->panel()->standard(
 
   26        $panel = $renderer->render($panel);
 
   29    return $renderer->render([$button, $modal]) . $panel;
 
An exception for terminatinating execution or to throw for unit testing.
catch(Exception $e) $message