Bitte zum Testen nur aktuelle Browser verwenden! ILIAS unterstützt alle aktuellen Browser wie z.B. Firefox, Safari, Microsoft Edge, Chrome und Chromium. Der von Micosoft nicht mehr unterstützte und weiterentwickelte 'Internet Explorer' kann nicht zum Testen von ILIAS 7 verwendet werden.
Testers are the best!

Documentation

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

Standard

Description

Purpose
The standard filter is the default filter to be used in ILIAS. If there is no good reason using another filter instance in ILIAS, this is the one that should be used.

Rules

Usage
  1. Standard filters MUST be used if there is no good reason using another instance.

Example 1: Base

Filter Data: Array ( [title] => [select] => [with_def] => Def.Value [init_hide] => [number] => [multi_select] => )
/**
 * Example show how to create and render a basic filter.
 */
function base()
{
 
    //Step 0: Declare dependencies
    global $DIC;
    $ui = $DIC->ui()->factory();
    $renderer = $DIC->ui()->renderer();
 
    //Step 1: Define some input fields to plug into the filter.
    $title_input = $ui->input()->field()->text("Title");
    $select = $ui->input()->field()->select("Selection", ["one" => "One", "two" => "Two", "three" => "Three"]);
    $with_def = $ui->input()->field()->text("With Default")->withValue("Def.Value");
    $init_hide = $ui->input()->field()->text("Hidden initially");
    $number = $ui->input()->field()->numeric("Number");
    $multi_select = $ui->input()->field()->multiSelect(
        "Multi Selection",
        ["one" => "Num One", "two" => "Num Two", "three" => "Num Three", "four" => "Num Four", "five" => "Num Five"]
    );
 
    //Step 2: Define the filter and attach the inputs.
    $action = $DIC->ctrl()->getLinkTargetByClass("ilsystemstyledocumentationgui", "entries", "", true);
    $filter = $DIC->uiService()->filter()->standard(
        "filter_ID",
        $action,
        [
            "title" => $title_input,
            "select" => $select,
            "with_def" => $with_def,
            "init_hide" => $init_hide,
            "number" => $number,
            "multi_select" => $multi_select
        ],
        [true, true, true, false, true, true],
        true,
        true
    );
 
    //Step 3: Get filter data
    $filter_data = $DIC->uiService()->filter()->getData($filter);
 
    //Step 4: Render the filter
    return $renderer->render($filter) . "Filter Data: " . print_r($filter_data, true);
}
 

Relations

Parents
  1. UIComponent
  2. Input
  3. Container
  4. Filter