Dokumentation
'Kitchen Sink'-Dokumentation von Style: 'Delos' vom Skin: 'ILIAS'
Interruptive Item
Description
- Purpose
- Interruptive items are displayed in an Interruptive modal and represent the object(s) being affected by the critical action, e.g. deleting.
- Composition
- An Interruptive item is composed of an Id, title, description and an icon.
Rules
- Usage
- An interruptive item MUST have an ID and title.
- An interruptive item SHOULD have an icon representing the affected object.
- An interruptive item MAY have a description which helps to further identify the object. If an Interruptive modal displays multiple items having the the same title, the description MUST be used in order to distinct these objects from each other.
- If an interruptive item represents an ILIAS object, e.g. a course, then the Id, title, description and icon of the item MUST correspond to the Id, title, description and icon from the ILIAS object.
Example 1: Base
function base() { global $DIC; $factory = $DIC->ui()->factory(); $renderer = $DIC->ui()->renderer(); $message = 'Here you see an interruptive Item:'; $icon = $factory->image()->standard('./templates/default/images/icon_crs.svg', ''); $modal = $factory->modal()->interruptive('My Title', $message, "#") ->withAffectedItems(array( $factory->modal()->interruptiveItem( 10, 'Title of the Item', $icon, 'Note, this item is currently only to be used in interruptive Modal.' ), $factory->modal()->interruptiveItem( 20, 'Title of the other Item', $icon, 'And another one.' ) )); $button = $factory->button()->standard('Show an interruptive Item', '') ->withOnClick($modal->getShowSignal()); return $renderer->render([$button, $modal]); }
Relations
- Parents
- UIComponent
- Modal