ILIAS  release_7 Revision v7.30-3-g800a261c036
with_sections.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2016 Timon Amstutz <timon.amstutz@ilub.unibe.ch> Extended GPL, see docs/LICENSE */
4
5function with_sections()
6{
7 //Init Factory and Renderer
8 global $DIC;
9 $f = $DIC->ui()->factory();
10 $renderer = $DIC->ui()->renderer();
11
12 $content = $f->listing()->descriptive(
13 array(
14 "Entry 1" => "Some text",
15 "Entry 2" => "Some more text",
16 )
17 );
18
19 $image = $f->image()->responsive(
20 "./templates/default/images/HeaderIcon.svg",
21 "Thumbnail Example"
22 );
23
24 $card = $f->card()->standard(
25 "Title",
26 $image
27 )->withSections(
28 array(
29 $content,
30 $content,
31 $content
32 )
33 );
34
35 //Render
36 return $renderer->render($card);
37}
An exception for terminatinating execution or to throw for unit testing.
global $DIC
Definition: goto.php:24
with_sections()