27     protected \ILIAS\MediaObjects\MediaType\MediaTypeManager 
$media_type;
    33     protected \ILIAS\DI\UIServices 
$ui;
    37         string $a_parent_cmd = 
"",
    38         bool $a_edit_order = 
false,
    39         bool $a_presentation_mode = 
false    43         $this->
ctrl = $DIC->ctrl();
    44         $this->
lng = $DIC->language();
    45         $this->
access = $DIC->access();
    46         $ilCtrl = $DIC->ctrl();
    47         $lng = $DIC->language();
    48         $this->request = $DIC->mediaCast()
    52         $this->
ui = $DIC->ui();
    53         $this->edit_order = $a_edit_order;
    54         $this->presentation_mode = $a_presentation_mode;
    62         if (!$this->presentation_mode) {
    67         if (!$this->edit_order) {
    73             "tpl.table_media_cast_row.html",
    74             "components/ILIAS/MediaCast"    77         $this->media_type = $DIC->mediaObjects()->internal()->domain()->mediaType();
    82     protected function fillRow(array $a_set): void
    91         $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
    93         if ($this->presentation_mode) {
    94             $ilCtrl->setParameterByClass(
"ilobjmediacastgui", 
"presentation", 
"1");
    98         if ($enable_internal_rss && !$this->presentation_mode) {
    99             $this->tpl->setCurrentBlock(
"access");
   100             $this->tpl->setVariable(
"TXT_ACCESS", 
$lng->
txt(
"news_news_item_visibility"));
   102                 $this->tpl->setVariable(
"VAL_ACCESS", 
$lng->
txt(
"news_visibility_public"));
   104                 $this->tpl->setVariable(
"VAL_ACCESS", 
$lng->
txt(
"news_visibility_users"));
   106             $this->tpl->parseCurrentBlock();
   109         $ilCtrl->setParameterByClass(
"ilobjmediacastgui", 
"item_id", 
"");
   112             if ($a_set[
"update_date"] != 
"") {
   113                 $this->tpl->setCurrentBlock(
"last_update");
   114                 $this->tpl->setVariable(
   118                 $this->tpl->setVariable(
   122                 $this->tpl->parseCurrentBlock();
   126             $med = $mob->getMediaItem(
"Standard");
   128             $this->tpl->setVariable(
   132             $this->tpl->setVariable(
   136             $this->tpl->setVariable(
   140             $this->tpl->setVariable(
   145             $this->tpl->setVariable(
   150             if ($a_set[
"playtime"] != 
"00:00:00") {
   151                 $this->tpl->setVariable(
   156                 $this->tpl->setVariable(
"VAL_DURATION", 
"-");
   159             if (!$this->edit_order) {
   160                 if ($this->downloadable) {
   161                     $ilCtrl->setParameterByClass(
"ilobjmediacastgui", 
"item_id", $a_set[
"id"]);
   165                         $a_mob = $mob->getMediaItem($purpose);
   166                         if (!is_object($a_mob)) {
   169                         $ilCtrl->setParameterByClass(
"ilobjmediacastgui", 
"purpose", $a_mob->getPurpose());
   171                         if (is_file($file)) {
   172                             $size = filesize($file);
   173                             $size = 
", " . sprintf(
"%.1f MB", $size / 1024 / 1024);
   175                         $format = ($a_mob->getFormat() != 
"") ? $a_mob->getFormat() : 
"audio/mpeg";
   176                         $this->tpl->setCurrentBlock(
"downloadable");
   177                         $this->tpl->setVariable(
"TXT_DOWNLOAD", 
$lng->
txt(
"mcst_download_" . strtolower($a_mob->getPurpose())));
   178                         $this->tpl->setVariable(
"CMD_DOWNLOAD", $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui", 
"downloadItem"));
   179                         $this->tpl->setVariable(
"TITLE_DOWNLOAD", 
"(" . $format . $size . 
")");
   180                         $this->tpl->parseCurrentBlock();
   186                     ? $ilCtrl->getLinkTarget($this->parent_obj, 
"handlePlayerEvent", 
"", 
true, 
false)
   188                 if (!is_null($med)) {
   189                     $file = $mob->getStandardSrc();
   191                     if ($this->media_type->isAudio($med->getFormat())) {
   192                         $comp = $ui->factory()->player()->audio(
   196                     } elseif ($this->media_type->isVideo($med->getFormat())) {
   197                         $comp = $ui->factory()->player()->video(
   200                     } elseif ($this->media_type->isImage($med->getFormat())) {
   201                         $comp = $ui->factory()->image()->responsive($file, 
"");
   203                     if (!is_null($comp)) {
   204                         $this->tpl->setVariable(
"PLAYER", $ui->renderer()->render($comp));
   209                 $ilCtrl->setParameterByClass(
"ilobjmediacastgui", 
"item_id", $a_set[
"id"]);
   210                 if ($ilAccess->checkAccess(
"write", 
"", $this->request->getRefId()) &&
   211                     !$this->presentation_mode) {
   212                     $this->tpl->setCurrentBlock(
"edit");
   213                     $this->tpl->setVariable(
"TXT_EDIT", 
$lng->
txt(
"edit"));
   214                     $this->tpl->setVariable(
   216                         $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui", 
"editCastItem")
   219                     if (!is_int(strpos($med->getFormat(), 
"image/"))) {
   220                         $this->tpl->setVariable(
"TXT_DET_PLAYTIME", 
$lng->
txt(
"mcst_det_playtime"));
   221                         $this->tpl->setVariable(
   223                             $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui", 
"determinePlaytime")
   226                     $this->tpl->parseCurrentBlock();
   228                     $this->tpl->setCurrentBlock(
"edit_checkbox");
   229                     $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
   230                     $this->tpl->parseCurrentBlock();
   234                 $this->tpl->setCurrentBlock(
"edit_order");
   235                 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
   236                 $this->tpl->setVariable(
"VAL_ORDER", $a_set[
"order"]);
   237                 $this->tpl->parseCurrentBlock();
   242             if (!$this->presentation_mode) {
   243                 if ($a_set[
"mob_cnt_download"] > 0) {
   244                     $this->tpl->setCurrentBlock(
"prop");
   245                     $this->tpl->setVariable(
"TXT_PROP", 
$lng->
txt(
"mcst_download_cnt"));
   246                     $this->tpl->setVariable(
"VAL_PROP", $a_set[
"mob_cnt_download"]);
   247                     $this->tpl->parseCurrentBlock();
   249                 if ($a_set[
"mob_cnt_play"] > 0) {
   250                     $this->tpl->setCurrentBlock(
"prop");
   251                     $this->tpl->setVariable(
"TXT_PROP", 
$lng->
txt(
"mcst_play_cnt"));
   252                     $this->tpl->setVariable(
"VAL_PROP", $a_set[
"mob_cnt_play"]);
   253                     $this->tpl->parseCurrentBlock();
 
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ilObjUser $user=null,)
 
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...
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data 
 
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector. 
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template. 
 
__construct(Container $dic, ilPlugin $plugin)
 
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)