6include_once(
"Services/Table/classes/class.ilTable2GUI.php");
 
   21        function __construct($a_parent_obj, $a_parent_cmd = 
"", $a_edit_order = 
false,
 
   22                $a_presentation_mode = 
false)
 
   26                $this->edit_order = (bool)$a_edit_order;
 
   27                $this->presentation_mode = (bool)$a_presentation_mode;
 
   29                parent::__construct($a_parent_obj, $a_parent_cmd);
 
   33                $this->downloadable = $mediacast->getDownloadable();
 
   35                if (!$this->presentation_mode)
 
   40                $this->
addColumn($lng->txt(
"properties"));
 
   41                if(!$this->edit_order)
 
   43                        $this->
addColumn($lng->txt(
"mcst_play"), 
"", 
"320px");
 
   66                include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
 
   69                $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
 
   71                if ($this->presentation_mode)
 
   73                        $ilCtrl->setParameterByClass(
"ilobjmediacastgui", 
"presentation", 
"1");
 
   77                if ($enable_internal_rss && !$this->presentation_mode)
 
   79                        $this->tpl->setCurrentBlock(
"access");
 
   80                        $this->tpl->setVariable(
"TXT_ACCESS", 
$lng->txt(
"news_news_item_visibility"));
 
   83                                $this->tpl->setVariable(
"VAL_ACCESS", 
$lng->txt(
"news_visibility_public"));
 
   87                                $this->tpl->setVariable(
"VAL_ACCESS", 
$lng->txt(
"news_visibility_users"));
 
   89                        $this->tpl->parseCurrentBlock();
 
   92                $ilCtrl->setParameterByClass(
"ilobjmediacastgui", 
"item_id", 
"");
 
   96                        if ($a_set[
"update_date"] != 
"")
 
   98                                $this->tpl->setCurrentBlock(
"last_update");
 
   99                                $this->tpl->setVariable(
"TXT_LAST_UPDATE",
 
  100                                        $lng->txt(
"last_update"));
 
  101                                $this->tpl->setVariable(
"VAL_LAST_UPDATE",
 
  103                                $this->tpl->parseCurrentBlock();
 
  107                        $med = $mob->getMediaItem(
"Standard");
 
  109                        $this->tpl->setVariable(
"VAL_TITLE",
 
  111                        $this->tpl->setVariable(
"VAL_DESCRIPTION",
 
  113                        $this->tpl->setVariable(
"TXT_CREATED",
 
  114                                $lng->txt(
"created"));
 
  115                        $this->tpl->setVariable(
"VAL_CREATED",
 
  118                        $this->tpl->setVariable(
"TXT_DURATION",
 
  119                                $lng->txt(
"mcst_play_time"));
 
  121                        if ($a_set[
"playtime"] != 
"00:00:00")
 
  123                                $this->tpl->setVariable(
"VAL_DURATION",
 
  128                                $this->tpl->setVariable(
"VAL_DURATION", 
"-");
 
  131                        if(!$this->edit_order)
 
  133                                if ($this->downloadable) 
 
  135                                        $ilCtrl->setParameterByClass(
"ilobjmediacastgui", 
"item_id", $a_set[
"id"]);
 
  140                                                $a_mob = $mob->getMediaItem($purpose);
 
  141                                                if (!is_object($a_mob))
 
  143                                                $ilCtrl->setParameterByClass(
"ilobjmediacastgui", 
"purpose", $a_mob->getPurpose());
 
  148                                                        $size = 
", ".sprintf(
"%.1f MB",
$size/1024/1024);
 
  150                                                $format = ($a_mob->getFormat()!= 
"")?$a_mob->getFormat():
"audio/mpeg";                                  
 
  151                                                $this->tpl->setCurrentBlock(
"downloadable");
 
  152                                                $this->tpl->setVariable(
"TXT_DOWNLOAD", 
$lng->txt(
"mcst_download_" . strtolower($a_mob->getPurpose())));
 
  153                                                $this->tpl->setVariable(
"CMD_DOWNLOAD", 
$ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui", 
"downloadItem"));
 
  154                                                $this->tpl->setVariable(
"TITLE_DOWNLOAD", 
"(".$format.$size.
")");
 
  155                                                $this->tpl->parseCurrentBlock();
 
  159                                include_once(
"./Services/MediaObjects/classes/class.ilMediaPlayerGUI.php");
 
  162                                $event_url =  ($this->presentation_mode)
 
  163                                        ? 
$ilCtrl->getLinkTarget($this->parent_obj, 
"handlePlayerEvent", 
"", 
true, 
false)
 
  168                                        require_once(
'./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
 
  169                                        if (strcasecmp(
"Reference", $med->getLocationType()) == 0) {
 
  170                                                $a_file = $med->getLocation();
 
  176                                        $mpl->setMimeType ($med->getFormat());
 
  178                                        $mpl->setDisplayWidth(
"640");
 
  179                                        $mpl->setDisplayHeight(
"480");
 
  181                                        $mpl->setTitle($a_set[
"title"]);
 
  182                                        $mpl->setDescription($a_set[
"content"]);
 
  184                                        $med_alt = $mob->getMediaItem(
"VideoAlternative");
 
  185                                        if (is_object($med_alt))
 
  189                                                $mpl->setAlternativeVideoMimeType($med_alt->getFormat());
 
  194                                $this->tpl->setVariable(
"PLAYER", $mpl->getPreviewHtml());
 
  197                                $ilCtrl->setParameterByClass(
"ilobjmediacastgui", 
"item_id", $a_set[
"id"]);
 
  198                                if ($ilAccess->checkAccess(
"write", 
"", 
$_GET[
"ref_id"]) &&
 
  199                                        !$this->presentation_mode)
 
  201                                        $this->tpl->setCurrentBlock(
"edit");
 
  202                                        $this->tpl->setVariable(
"TXT_EDIT", 
$lng->txt(
"edit"));
 
  203                                        $this->tpl->setVariable(
"CMD_EDIT",
 
  204                                                $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui", 
"editCastItem"));
 
  206                                        if (!is_int(strpos($med->getFormat(), 
"image/")))
 
  208                                                $this->tpl->setVariable(
"TXT_DET_PLAYTIME", 
$lng->txt(
"mcst_det_playtime"));
 
  209                                                $this->tpl->setVariable(
"CMD_DET_PLAYTIME",
 
  210                                                        $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui", 
"determinePlaytime"));
 
  212                                        $this->tpl->parseCurrentBlock();
 
  214                                        $this->tpl->setCurrentBlock(
"edit_checkbox");
 
  215                                        $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
 
  216                                        $this->tpl->parseCurrentBlock();
 
  222                                $this->tpl->setCurrentBlock(
"edit_order");
 
  223                                $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
 
  224                                $this->tpl->setVariable(
"VAL_ORDER", $a_set[
"order"]);
 
  225                                $this->tpl->parseCurrentBlock();
 
  230                        if (!$this->presentation_mode)
 
  232                                if ($a_set[
"mob_cnt_download"] > 0)
 
  234                                        $this->tpl->setCurrentBlock(
"prop");
 
  235                                        $this->tpl->setVariable(
"TXT_PROP", 
$lng->txt(
"mcst_download_cnt"));
 
  236                                        $this->tpl->setVariable(
"VAL_PROP", $a_set[
"mob_cnt_download"]);
 
  237                                        $this->tpl->parseCurrentBlock();
 
  239                                if ($a_set[
"mob_cnt_play"] > 0)
 
  241                                        $this->tpl->setCurrentBlock(
"prop");
 
  242                                        $this->tpl->setVariable(
"TXT_PROP", 
$lng->txt(
"mcst_play_cnt"));
 
  243                                        $this->tpl->setVariable(
"VAL_PROP", $a_set[
"mob_cnt_play"]);
 
  244                                        $this->tpl->parseCurrentBlock();
 
An exception for terminatinating execution or to throw for unit testing.
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
static signFile($path_to_file)
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file