UPDATE-RATE

Die Test-Installation wird aktuell zwischen 8:00 und 18:00 Uhr stündlich zur vollen Stunde aktualisiert.

Alles neu macht der Mai

ILIAS 9 ist da! Alle Infos zu den Highlights der neuen Version gibt es hier!

Documentation

Kitchen Sink documentation of style: 'Delos' of skin: 'ILIAS'

Lightbox Text Page

Description

Purpose
A Lightbox text page represents a document like content/text inside a Lightbox modal.
Composition
The page consists of text and a title
Effect
The text is displayed in the content section of the Lightbox modal and the title is used as modal title.

Rules

Usage
  1. A Lightbox text page MUST have text content and a short title.
  2. A Lightbox text page MUST NOT have a description.

Example 1: Show a single text

<?php
 
declare(strict_types=1);
 
namespace ILIAS\UI\examples\Modal\LightboxTextPage;
 
function show_a_single_text()
{
    global $DIC;
    $factory = $DIC->ui()->factory();
    $renderer = $DIC->ui()->renderer();
    $page = $factory->modal()->lightboxTextPage('Some text content you have to agree on!', 'User Agreement');
    $modal = $factory->modal()->lightbox($page);
    $button = $factory->button()->standard('Show Text', '')
        ->withOnClick($modal->getShowSignal());
 
    return $renderer->render([$button, $modal]);
}
 

Example 2: Show multiple texts

<?php
 
declare(strict_types=1);
 
namespace ILIAS\UI\examples\Modal\LightboxTextPage;
 
function show_multiple_texts()
{
    global $DIC;
    $factory = $DIC->ui()->factory();
    $renderer = $DIC->ui()->renderer();
    $page1 = $factory->modal()->lightboxTextPage('Some text content you have to agree on!', 'User Agreement');
    $page2 = $factory->modal()->lightboxTextPage(
        'Another text content you have to agree on!',
        'Data Privacy Statement'
    );
    $modal = $factory->modal()->lightbox([$page1, $page2]);
    $button = $factory->button()->standard('Show Texts', '')
        ->withOnClick($modal->getShowSignal());
 
    return $renderer->render([$button, $modal]);
}
 

Relations

Parents
  1. UIComponent
  2. Modal