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
- Standard Card MUST be used if there is no good reason using another instance.
Example 1: Base
<?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
<?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
- UIComponent
- Card