ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
with_audio_player.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
10 function with_audio_player(): string
11 {
12  global $DIC;
13  $f = $DIC->ui()->factory();
14  $renderer = $DIC->ui()->renderer();
15 
16  $actions = $f->dropdown()->standard(array(
17  $f->button()->shy("ILIAS", "https://www.ilias.de"),
18  $f->button()->shy("GitHub", "https://www.github.com")
19  ));
20 
21  $audio = $f->player()->audio("https://files.ilias.de/ILIAS-Audio.mp3", "");
22 
23  $app_item = $f->item()->standard("ILIAS Audio")
24  ->withActions($actions)
25  ->withAudioPlayer($audio)
26  ->withProperties(array(
27  "Length" => "00:00:26"))
28  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.")
29  ->withLeadImage($f->image()->responsive(
30  "src/UI/examples/Image/HeaderIconLarge.svg",
31  "Thumbnail Example"
32  ));
33  return $renderer->render($app_item);
34 }
global $DIC
Definition: feed.php:28
with_audio_player()
With audio player.