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'

Standard

Description

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

Rules

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

Example 1: Base

Open Title
Title
<?php
 
declare(strict_types=1);
 
namespace ILIAS\UI\examples\Card\Standard;
 
/* Copyright (c) 2016 Timon Amstutz <timon.amstutz@ilub.unibe.ch> Extended GPL, see docs/LICENSE */
 
function base()
{
    //Init Factory and Renderer
    global $DIC;
    $f = $DIC->ui()->factory();
    $renderer = $DIC->ui()->renderer();
 
    $content = $f->listing()->descriptive(
        array(
            "Entry 1" => "Some text",
            "Entry 2" => "Some more text",
        )
    );
 
    $image = $f->image()->responsive(
        "./templates/default/images/logo/HeaderIcon.svg",
        "Thumbnail Example"
    );
 
    $card = $f->card()->standard("Title", $image);
 
    //Render
    return $renderer->render($card);
}
 

Example 2: With sections

Open Title
Title
Entry 1
Some text
Entry 2
Some more text
Entry 1
Some text
Entry 2
Some more text
Entry 1
Some text
Entry 2
Some more text
<?php
 
declare(strict_types=1);
 
namespace ILIAS\UI\examples\Card\Standard;
 
/* Copyright (c) 2016 Timon Amstutz <timon.amstutz@ilub.unibe.ch> Extended GPL, see docs/LICENSE */
 
function with_sections()
{
    //Init Factory and Renderer
    global $DIC;
    $f = $DIC->ui()->factory();
    $renderer = $DIC->ui()->renderer();
 
    $content = $f->listing()->descriptive(
        array(
            "Entry 1" => "Some text",
            "Entry 2" => "Some more text",
        )
    );
 
    $image = $f->image()->responsive(
        "./templates/default/images/logo/HeaderIcon.svg",
        "Thumbnail Example"
    );
 
    $card = $f->card()->standard(
        "Title",
        $image
    )->withSections(
        array(
            $content,
            $content,
            $content
        )
    );
 
    //Render
    return $renderer->render($card);
}
 

Example 3: With title action

<?php
 
declare(strict_types=1);
 
namespace ILIAS\UI\examples\Card\Standard;
 
/* Copyright (c) 2016 Jesús López <lopez@leifos.de> Extended GPL, see docs/LICENSE */
 
function with_title_action()
{
    //Init Factory and Renderer
    global $DIC;
    $f = $DIC->ui()->factory();
    $renderer = $DIC->ui()->renderer();
 
    $image = $f->image()->responsive(
        "./templates/default/images/logo/HeaderIcon.svg",
        "Thumbnail Example"
    );
 
    $url = "http://www.ilias.de";
 
    $card = $f->card()->standard("Title", $image)->withTitleAction($url);
 
    //Render
    return $renderer->render($card);
}
 

Relations

Parents
  1. UIComponent
  2. Card