TableGUI class for table NewsForContext. More...
Inheritance diagram for ilMediaCastTableGUI:
Collaboration diagram for ilMediaCastTableGUI:Public Member Functions | |
| ilMediaCastTableGUI ($a_parent_obj, $a_parent_cmd="") | |
Protected Member Functions | |
| fillRow ($a_set) | |
| Standard Version of Fill Row. | |
TableGUI class for table NewsForContext.
Definition at line 34 of file class.ilMediaCastTableGUI.php.
| ilMediaCastTableGUI::fillRow | ( | $ | a_set | ) | [protected] |
Standard Version of Fill Row.
Most likely to be overwritten by derived class.
Reimplemented from ilTable2GUI.
Definition at line 59 of file class.ilMediaCastTableGUI.php.
References $_GET, $ilCtrl, $lng, ilObject::_exists(), and ilObjMediaObject::_getURL().
{
global $lng, $ilCtrl, $ilAccess;
include_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
$news_set = new ilSetting("news");
$enable_internal_rss = $news_set->get("enable_rss_for_internal");
// edit link
$ilCtrl->setParameterByClass("ilobjmediacastgui", "item_id", $a_set["id"]);
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
{
$this->tpl->setCurrentBlock("edit");
$this->tpl->setVariable("TXT_EDIT", $lng->txt("edit"));
$this->tpl->setVariable("CMD_EDIT",
$ilCtrl->getLinkTargetByClass("ilobjmediacastgui", "editCastItem"));
$this->tpl->setVariable("TXT_DET_PLAYTIME", $lng->txt("mcst_det_playtime"));
$this->tpl->setVariable("CMD_DET_PLAYTIME",
$ilCtrl->getLinkTargetByClass("ilobjmediacastgui", "determinePlaytime"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setVariable("TXT_DOWNLOAD", $lng->txt("download"));
$this->tpl->setVariable("CMD_DOWNLOAD",
$ilCtrl->getLinkTargetByClass("ilobjmediacastgui", "downloadItem"));
// access
if ($enable_internal_rss)
{
$this->tpl->setCurrentBlock("access");
$this->tpl->setVariable("TXT_ACCESS", $lng->txt("news_news_item_visibility"));
if ($a_set["visibility"] == NEWS_PUBLIC)
{
$this->tpl->setVariable("VAL_ACCESS", $lng->txt("news_visibility_public"));
}
else
{
$this->tpl->setVariable("VAL_ACCESS", $lng->txt("news_visibility_users"));
}
$this->tpl->parseCurrentBlock();
}
$ilCtrl->setParameterByClass("ilobjmediacastgui", "item_id", "");
if (ilObject::_exists($a_set["mob_id"]))
{
if ($a_set["update_date"] != "")
{
$this->tpl->setCurrentBlock("last_update");
$this->tpl->setVariable("TXT_LAST_UPDATE",
$lng->txt("last_update"));
$this->tpl->setVariable("VAL_LAST_UPDATE",
$a_set["update_date"]);
$this->tpl->parseCurrentBlock();
}
$mob = new ilObjMediaObject($a_set["mob_id"]);
$med = $mob->getMediaItem("Standard");
$this->tpl->setVariable("VAL_TITLE",
$a_set["title"]);
$this->tpl->setVariable("VAL_DESCRIPTION",
$a_set["content"]);
$this->tpl->setVariable("TXT_FILENAME",
$lng->txt("filename"));
$this->tpl->setVariable("VAL_FILENAME",
$mob->getTitle());
$this->tpl->setVariable("TXT_CREATED",
$lng->txt("created"));
$this->tpl->setVariable("VAL_CREATED",
$a_set["creation_date"]);
$this->tpl->setVariable("TXT_DURATION",
$lng->txt("mcst_play_time"));
$this->tpl->setVariable("VAL_DURATION",
$a_set["playtime"]);
include_once("./Services/MediaObjects/classes/class.ilMediaPlayerGUI.php");
$mpl = new ilMediaPlayerGUI();
if (strcasecmp("Reference", $med->getLocationType()) == 0)
$mpl->setFile($med->getLocation());
else
$mpl->setFile(ilObjMediaObject::_getURL($mob->getId())."/".$med->getLocation());
$mpl->setDisplayHeight($med->getHeight());
$this->tpl->setVariable("PLAYER",
$mpl->getMp3PlayerHtml());
$this->tpl->setVariable("VAL_ID", $a_set["id"]);
}
}
Here is the call graph for this function:| ilMediaCastTableGUI::ilMediaCastTableGUI | ( | $ | a_parent_obj, | |
| $ | a_parent_cmd = "" | |||
| ) |
Definition at line 37 of file class.ilMediaCastTableGUI.php.
References $ilCtrl, $lng, ilTable2GUI::__construct(), ilTable2GUI::addColumn(), ilTable2GUI::setDefaultOrderDirection(), ilTable2GUI::setDefaultOrderField(), ilTable2GUI::setFormAction(), and ilTable2GUI::setRowTemplate().
{
global $ilCtrl, $lng;
parent::__construct($a_parent_obj, $a_parent_cmd);
$this->addColumn("", "f", "1");
$this->addColumn($lng->txt("mcst_entry"), "", "33%");
$this->addColumn("", "", "33%");
$this->addColumn("", "", "34%");
$this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
$this->setRowTemplate("tpl.table_media_cast_row.html",
"Modules/MediaCast");
$this->setDefaultOrderField("creation_date");
$this->setDefaultOrderDirection("desc");
}
Here is the call graph for this function:
1.7.1