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'

Field Selection

Description

Purpose
Field Selection is used to limit a visualization of data to a choice of aspects, e.g. in picking specific columns of a table or fields of a diagram.
Composition
A Field Selection uses checkboxes in a dropdown. A Standard Button is used to submit the user's choice.
Effect
When operating the dropdown, the Multiselect is shown. The dropdown is being closed upon submission or by clicking outside of it.

Example 1: Base

Array
(
    [0] => 
)

<?php
 
declare(strict_types=1);
 
namespace ILIAS\UI\examples\Input\ViewControl\FieldSelection;
 
/**
 * basic example of a FieldSelection ViewControl
 */
function base()
{
    global $DIC;
    $f = $DIC->ui()->factory();
    $r = $DIC->ui()->renderer();
 
    //construct with options and labels for aria and button.
    $fs = $f->input()->viewControl()->fieldSelection(
        [
            'c1' => 'column 1',
            'c2' => 'column 2',
            'x' => '...'
        ],
        'shown columns',
        'apply'
    );
 
    //it's more fun to view this in a ViewControlContainer
    $vc_container = $f->input()->container()->viewControl()->standard([$fs])
        ->withRequest($DIC->http()->request());
 
    return $r->render([
        $f->legacy('<pre>' . print_r($vc_container->getData(), true) . '</pre>'),
        $f->divider()->horizontal(),
        $vc_container
    ]);
}
 

Relations

Parents
  1. UIComponent
  2. Input
  3. View Control