ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\MediaCast\Video\VideoPreviewGUI Class Reference

Video preview UI. More...

+ Collaboration diagram for ILIAS\MediaCast\Video\VideoPreviewGUI:

Public Member Functions

 __construct (string $file, string $onclick, string $playing_time)
 
 render ()
 

Protected Attributes

ILIAS DI UIServices $ui
 
string $file = ""
 
string $onclick = ""
 
string $playing_time = ""
 
ilLanguage $lng
 

Detailed Description

Video preview UI.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 25 of file class.VideoPreviewGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\MediaCast\Video\VideoPreviewGUI::__construct ( string  $file,
string  $onclick,
string  $playing_time 
)

Definition at line 33 of file class.VideoPreviewGUI.php.

37 {
38 global $DIC;
39
40 $this->ui = $DIC->ui();
41 $this->file = $file;
42 $this->onclick = $onclick;
43 $this->playing_time = $playing_time;
44 $this->lng = $DIC->language();
45 $this->lng->loadLanguageModule("mcst");
46 }
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\MediaCast\Video\VideoPreviewGUI\$file, ILIAS\MediaCast\Video\VideoPreviewGUI\$onclick, ILIAS\MediaCast\Video\VideoPreviewGUI\$playing_time, ILIAS\Repository\lng(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

Member Function Documentation

◆ render()

ILIAS\MediaCast\Video\VideoPreviewGUI::render ( )
Exceptions

ilTemplateException

Definition at line 51 of file class.VideoPreviewGUI.php.

51 : string
52 {
54
55 $tpl = new \ilTemplate("tpl.video_preview.html", true, true, "components/ILIAS/MediaCast/Video");
56 $im = $this->ui->factory()->image()->responsive($this->file, "");
57 $tpl->setVariable("IMAGE", $this->ui->renderer()->render($im));
58 $tpl->setVariable("ONCLICK", $this->onclick);
59 $tpl->setVariable("PLAYING_TIME", $this->playing_time);
60 $tpl->setVariable("WATCHED", $lng->txt("mcst_watched"));
61
62 return $tpl->get();
63 }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...

References ILIAS\MediaCast\Video\VideoPreviewGUI\$lng, ilLanguage\txt(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

Field Documentation

◆ $file

string ILIAS\MediaCast\Video\VideoPreviewGUI::$file = ""
protected

◆ $lng

ilLanguage ILIAS\MediaCast\Video\VideoPreviewGUI::$lng
protected

◆ $onclick

string ILIAS\MediaCast\Video\VideoPreviewGUI::$onclick = ""
protected

◆ $playing_time

string ILIAS\MediaCast\Video\VideoPreviewGUI::$playing_time = ""
protected

◆ $ui

ILIAS DI UIServices ILIAS\MediaCast\Video\VideoPreviewGUI::$ui
protected

Definition at line 27 of file class.VideoPreviewGUI.php.


The documentation for this class was generated from the following file: