本文整理汇总了PHP中ilFrameTargetInfo类的典型用法代码示例。如果您正苦于以下问题:PHP ilFrameTargetInfo类的具体用法?PHP ilFrameTargetInfo怎么用?PHP ilFrameTargetInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ilFrameTargetInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addRepositoryItems
/**
* add repository item
*
* @param int $a_ref_id current ref id (optional);
* if empty $_GET["ref_id"] is used
*/
function addRepositoryItems($a_ref_id = 0)
{
global $tree, $ilCtrl;
if ($a_ref_id == 0) {
$a_ref_id = $_GET["ref_id"];
}
include_once './Services/Container/classes/class.ilMemberViewSettings.php';
if (ilMemberViewSettings::getInstance()->isActive() and $a_ref_id != ROOT_FOLDER_ID) {
$a_start = ilMemberViewSettings::getInstance()->getContainer();
} else {
$a_start = ROOT_FOLDER_ID;
}
if ($a_ref_id > 0) {
$path = $tree->getPathFull($a_ref_id, $a_start);
// add item for each node on path
foreach ((array) $path as $key => $row) {
if (!in_array($row["type"], array("root", "cat", "crs", "fold", "grp", "icrs"))) {
continue;
}
if ($row["title"] == "ILIAS" && $row["type"] == "root") {
$row["title"] = $this->lng->txt("repository");
}
$ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $row["child"]);
$this->addItem($row["title"], $ilCtrl->getLinkTargetByClass("ilrepositorygui", "frameset"), ilFrameTargetInfo::_getFrame("MainContent"), $row["child"]);
$ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
}
}
}
示例2: getCommandFrame
/**
* Get command target frame
*
* @param string $a_cmd command
*
* @return string command target frame
*/
function getCommandFrame($a_cmd)
{
if (IS_PAYMENT_ENABLED) {
include_once 'Services/Payment/classes/class.ilPaymentObject.php';
if (ilPaymentObject::_isBuyable($this->ref_id) && !ilPaymentObject::_hasAccess($this->ref_id)) {
return '';
}
}
$frame = "";
switch ($a_cmd) {
// BEGIN WebDAV: View inline objects in a blank window
case 'sendfile':
require_once 'Modules/File/classes/class.ilObjFileAccess.php';
if (ilObjFileAccess::_isFileInline($this->title)) {
$frame = '_blank';
}
break;
// END WebDAV View inline objects in a blank window
// END WebDAV View inline objects in a blank window
case "":
$frame = ilFrameTargetInfo::_getFrame("RepositoryContent");
break;
default:
}
return $frame;
}
示例3: getCommandFrame
/**
* Get command target frame
*
* @param string $a_cmd command
*
* @return string command target frame
*/
function getCommandFrame($a_cmd)
{
switch ($a_cmd) {
default:
$frame = ilFrameTargetInfo::_getFrame("MainContent");
break;
}
return $frame;
}
示例4: getCommandFrame
/**
* Get command target frame
*
* @param string $a_cmd command
*
* @return string command target frame
*/
function getCommandFrame($a_cmd)
{
switch ($a_cmd) {
case "":
case "questions":
include_once "./Services/UICore/classes/class.ilFrameTargetInfo.php";
$frame = ilFrameTargetInfo::_getFrame("MainContent");
break;
default:
}
return $frame;
}
示例5: getCommandFrame
/**
* Get command target frame
*
* @param string $a_cmd command
*
* @return string command target frame
*/
function getCommandFrame($a_cmd)
{
switch ($a_cmd) {
case "":
if (ilObjLinkResourceAccess::_checkDirectLink($this->obj_id)) {
$frame = '_blank';
} else {
$frame = ilFrameTargetInfo::_getFrame("RepositoryContent");
}
break;
default:
}
return $frame;
}
示例6: getAdminTabs
/**
* @param ilTabsGUI $tabs_gui
*/
public function getAdminTabs(ilTabsGUI $tabs_gui)
{
/**
* @var $tree ilTree
*/
global $tree;
if (isset($_GET['admin_mode']) && $_GET['admin_mode'] == 'repository') {
$this->ctrl->setParameterByClass('iladministrationgui', 'admin_mode', 'settings');
$tabs_gui->setBackTarget($this->lng->txt('administration'), $this->ctrl->getLinkTargetByClass('iladministrationgui', 'frameset'), ilFrameTargetInfo::_getFrame('MainContent'));
$this->ctrl->setParameterByClass('iladministrationgui', 'admin_mode', 'repository');
}
if ($tree->getSavedNodeData($this->object->getRefId())) {
$tabs_gui->addTarget('trash', $this->ctrl->getLinkTarget($this, 'trash'), 'trash', get_class($this));
}
}
示例7: switch
/**
* execute command
*/
function &executeCommand()
{
global $ilCtrl, $tpl;
$next_class = $ilCtrl->getNextClass($this);
$cmd = $ilCtrl->getCmd();
switch ($next_class) {
case "ilscorm2004pagegui":
$tpl->getStandardTemplate();
$this->setContentStyle();
$this->setLocator();
// Determine whether the view of a learning resource should
// be shown in the frameset of ilias, or in a separate window.
//$showViewInFrameset = $this->ilias->ini->readVariable("layout","view_target") == "frame";
$showViewInFrameset = true;
$ilCtrl->setReturn($this, "edit");
include_once "./Modules/Scorm2004/classes/class.ilSCORM2004PageGUI.php";
$page_gui =& new ilSCORM2004PageGUI($this->slm_object->getType(), $this->node_object->getId(), 0, $this->getParentGUI()->object->getId(), $this->slm_object->getAssignedGlossary());
$page_gui->setEditPreview(true);
$page_gui->setPresentationTitle($this->node_object->getTitle());
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
$page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId($this->slm_object->getStyleSheetId(), "sahs"));
if ($this->node_object->tree->getParentId($this->node_object->getId()) > 0) {
$sco = new ilSCORM2004Sco($this->node_object->getSLMObject(), $this->node_object->tree->getParentId($this->node_object->getId()));
if (count($sco->getGlossaryTermIds()) > 1) {
include_once "./Modules/Scorm2004/classes/class.ilSCORM2004ScoGUI.php";
$page_gui->setGlossaryOverviewInfo(ilSCORM2004ScoGUI::getGlossaryOverviewId(), $sco);
}
}
$ilCtrl->setParameterByClass("ilobjscorm2004learningmodulegui", "active_node", $_GET["obj_id"]);
$page_gui->setExplorerUpdater("tree", "tree_div", $ilCtrl->getLinkTargetByClass("ilobjscorm2004learningmodulegui", "showTree", "", true));
$ilCtrl->setParameterByClass("ilobjscorm2004learningmodulegui", "active_node", "");
// set page view link
$view_frame = ilFrameTargetInfo::_getFrame("MainContent");
$page_gui->setLinkParams("ref_id=" . $this->slm_object->getRefId());
$tpl->setTitleIcon(ilUtil::getImagePath("icon_pg_b.png"));
$page_gui->activateMetaDataEditor($this->slm_object->getID(), $this->node_object->getId(), $this->node_object->getType(), $this->node_object, 'MDUpdateListener');
$ret = $ilCtrl->forwardCommand($page_gui);
$this->setTabs();
$tpl->setContent($ret);
break;
default:
$ret =& $this->{$cmd}();
break;
}
return $ret;
}
示例8: getCommandFrame
/**
* Get command target frame
*
* @param string $a_cmd command
*
* @return string command target frame
*/
function getCommandFrame($a_cmd)
{
global $ilias;
switch ($a_cmd) {
case "view":
//$showViewInFrameset = $ilias->ini->readVariable("layout","view_target") == "frame";
$showViewInFrameset = true;
include_once 'Services/Payment/classes/class.ilPaymentObject.php';
$isBuyable = ilPaymentObject::_isBuyable($this->ref_id);
if ($isBuyable && ilPaymentObject::_hasAccess($this->ref_id) == false || $showViewInFrameset) {
$frame = ilFrameTargetInfo::_getFrame("MainContent");
} else {
$frame = ilFrameTargetInfo::_getFrame("MainContent");
//$frame = "ilContObj".$this->obj_id;
}
break;
case "edit":
$frame = ilFrameTargetInfo::_getFrame("MainContent");
break;
default:
$frame = "";
break;
}
return $frame;
}
示例9: fillRow
/**
* Fill template row
* @param array $a_set
*/
protected function fillRow($a_set)
{
global $objDefinition;
include_once './Services/Link/classes/class.ilLink.php';
$this->tpl->setCurrentBlock('item_row');
$this->tpl->setVariable('ITEM_ID', $a_set['id']);
$this->tpl->setVariable('COLL_TITLE', $a_set['title']);
$this->tpl->setVariable('COLL_DESC', $a_set['description']);
if ($this->getMode() == LP_MODE_SCORM) {
$this->tpl->setVariable('TYPE_IMG', ilUtil::getImagePath('icon_sco_s.png'));
$this->tpl->setVariable('ALT_IMG', $this->lng->txt('obj_sco'));
} else {
if ($objDefinition->isPluginTypeName($a_set["type"])) {
$alt = ilPlugin::lookupTxt("rep_robj", $a_set['type'], "obj_" . $a_set['type']);
} else {
$alt = $this->lng->txt('obj_' . $a_set['type']);
}
$this->tpl->setVariable('ALT_IMG', $alt);
$this->tpl->setVariable('TYPE_IMG', ilObject::_getIcon("", "tiny", $a_set['type']));
$this->tpl->setVariable('COLL_LINK', ilLink::_getLink($a_set['ref_id'], $a_set['type']));
$this->tpl->setVariable('COLL_FRAME', ilFrameTargetInfo::_getFrame('MainContent', $a_set['type']));
include_once './Services/Tree/classes/class.ilPathGUI.php';
$path = new ilPathGUI();
$this->tpl->setVariable('COLL_PATH', $this->lng->txt('path') . ': ' . $path->getPath($this->getNode(), $a_set['ref_id']));
$mode = $a_set['mode_id'];
if ($mode != LP_MODE_DEACTIVATED && $mode != LP_MODE_UNDEFINED) {
$this->tpl->setVariable("COLL_MODE", $a_set['mode']);
} else {
$this->tpl->setVariable("COLL_MODE", "");
$this->tpl->setVariable("COLL_MODE_DEACTIVATED", $a_set['mode']);
}
if ($this->isAnonymized($a_set)) {
$this->tpl->setVariable("ANONYMIZED", $this->lng->txt('trac_anonymized_info_short'));
}
}
// Assigned ?
$this->tpl->setVariable("ASSIGNED_IMG_OK", $a_set['status'] ? ilUtil::getImagePath('icon_ok.png') : ilUtil::getImagePath('icon_not_ok.png'));
$this->tpl->setVariable("ASSIGNED_STATUS", $a_set['status'] ? $this->lng->txt('trac_assigned') : $this->lng->txt('trac_not_assigned'));
$this->tpl->parseCurrentBlock();
// Parse grouped items
foreach ((array) $a_set['grouped'] as $item) {
$this->fillRow($item);
}
// show num obligatory info
if (count($a_set['grouped'])) {
$this->tpl->setCurrentBlock('num_passed_items');
$this->tpl->setVariable('MIN_PASSED_TXT', $this->lng->txt('trac_min_passed'));
$this->tpl->setVariable('NUM_OBLIGATORY', $a_set['num_obligatory']);
$this->tpl->setVariable('GRP_ID', $a_set['grouping_id']);
$this->tpl->parseCurrentBlock();
}
}
示例10: getCommandFrame
/**
* @param string $a_cmd
* @return string
*/
public function getCommandFrame($a_cmd)
{
return ilFrameTargetInfo::_getFrame('MainContent');
}
示例11: buildFrameTarget
/**
*
* STATIC, do not use $this inside!
*
* Note: this is used by course interface !?
*/
function buildFrameTarget($a_type, $a_child = 0, $a_obj_id = 0)
{
global $ilias;
switch ($a_type) {
case "cat":
$t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "cat");
return $t_frame;
case "catr":
$t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "catr");
return $t_frame;
case "grp":
$t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "grp");
return $t_frame;
case "crs":
$t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "crs");
return $t_frame;
case "crsr":
$t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "crsr");
return $t_frame;
case 'rcrs':
$t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", 'rcrs');
return $t_frame;
default:
return "_top";
}
}
示例12: addAdminLocatorItems
/**
* should be overwritten to add object specific items
* (repository items are preloaded)
*/
function addAdminLocatorItems()
{
global $ilLocator;
if ($_GET["admin_mode"] == "settings" && $_GET["ref_id"] == ROLE_FOLDER_ID) {
$ilLocator->addItem($this->lng->txt("administration"), $this->ctrl->getLinkTargetByClass("iladministrationgui", "frameset"), ilFrameTargetInfo::_getFrame("MainContent"));
$ilLocator->addItem($this->lng->txt("obj_" . ilObject::_lookupType(ilObject::_lookupObjId($_GET["ref_id"]))), $this->ctrl->getLinkTargetByClass("ilobjrolefoldergui", "view"));
if ($_GET["obj_id"] > 0) {
$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "view"));
}
} else {
// ?
}
}
示例13: addStandardContainerSubTabs
/**
* Add standar container subtabs for view, manage, oderdering and text/media editor link
*/
function addStandardContainerSubTabs($a_include_view = true)
{
global $ilTabs, $ilAccess, $lng, $ilCtrl, $ilUser, $ilSetting;
if (!is_object($this->object)) {
return;
}
if ($a_include_view && $ilAccess->checkAccess("read", "", $this->object->getRefId())) {
if (!$this->isActiveAdministrationPanel()) {
$ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTarget($this, ""));
} else {
$ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTarget($this, "disableAdministrationPanel"));
}
}
if ($ilUser->getId() != ANONYMOUS_USER_ID && ($this->adminCommands || is_object($this->object) && $ilAccess->checkAccess("write", "", $this->object->getRefId()) || is_object($this->object) && $this->object->getHiddenFilesFound() || $_SESSION["clipboard"])) {
if ($this->isActiveAdministrationPanel()) {
$ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, ""));
} else {
$ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, "enableAdministrationPanel"));
}
}
if ($ilUser->getId() != ANONYMOUS_USER_ID && is_object($this->object) && $ilAccess->checkAccess("write", "", $this->object->getRefId())) {
$ilTabs->addSubTab("ordering", $lng->txt("cntr_ordering"), $ilCtrl->getLinkTarget($this, "editOrder"));
}
if ($ilUser->getId() != ANONYMOUS_USER_ID && is_object($this->object) && $ilAccess->checkAccess("write", "", $this->object->getRefId())) {
if ($ilSetting->get("enable_cat_page_edit")) {
$ilTabs->addSubTab("page_editor", $lng->txt("cntr_text_media_editor"), $ilCtrl->getLinkTarget($this, "editPageFrame"), ilFrameTargetInfo::_getFrame("MainContent"));
}
}
}
示例14: getCommandFrame
/**
* Get command target frame
*
* @param string $a_cmd command
*
* @return string command target frame
*/
function getCommandFrame($a_cmd)
{
return ilFrameTargetInfo::_getFrame("MainContent");
}
示例15: editTimings
function editTimings()
{
global $ilAccess, $ilErr;
include_once 'Services/MetaData/classes/class.ilMDEducational.php';
include_once './Services/Link/classes/class.ilLink.php';
$this->lng->loadLanguageModule('meta');
if (!$ilAccess->checkAccess('write', '', $this->container_obj->getRefId())) {
$ilErr->raiseError($this->lng->txt('msg_no_perm_write'), $ilErr->WARNING);
}
$this->__showTimingsPanel();
$this->tabs_gui->setSubTabActive('timings_timings');
include_once 'Services/Object/classes/class.ilObjectActivation.php';
$this->cont_arr = ilObjectActivation::getTimingsAdministrationItems($this->container_obj->getRefId());
$this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.crs_edit_items.html', 'Modules/Course');
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("HEADER_IMG", ilUtil::getImagePath('icon_crs.png'));
$this->tpl->setVariable("HEADER_ALT", $this->lng->txt('crs_materials'));
$this->tpl->setVariable("BLOCK_HEADER_CONTENT", $this->lng->txt('edit_timings_list'));
$this->tpl->setVariable("TXT_TITLE", $this->lng->txt('title'));
$this->tpl->setVariable("TXT_DURATION", $this->lng->txt('crs_timings_time_frame'));
$this->tpl->setVariable("TXT_INFO_DURATION", $this->lng->txt('crs_timings_in_days'));
$this->tpl->setVariable("TXT_START_END", $this->lng->txt('crs_timings_short_start_end'));
$this->tpl->setVariable("TXT_INFO_START_END", $this->lng->txt('crs_timings_start_end_info'));
$this->tpl->setVariable("TXT_CHANGEABLE", $this->lng->txt('crs_timings_short_changeable'));
$this->tpl->setVariable("TXT_INFO_LIMIT", $this->lng->txt('crs_timings_from_until'));
$this->tpl->setVariable("TXT_LIMIT", $this->lng->txt('crs_timings_short_limit_start_end'));
$this->tpl->setVariable("TXT_ACTIVE", $this->lng->txt('crs_timings_short_active'));
$this->tpl->setVariable("TXT_INFO_ACTIVE", $this->lng->txt('crs_timings_info_active'));
$counter = 0;
foreach ($this->cont_arr as $item) {
if ($item['type'] == 'itgr') {
continue;
}
$item = $this->__loadFromPost($item);
$item_prefix = "item[{$item['ref_id']}]";
$item_change_prefix = "item_change[{$item['ref_id']}]";
$item_active_prefix = "item_active[{$item['ref_id']}]";
if ($item['type'] == 'grp' or $item['type'] == 'fold') {
$this->tpl->setVariable("TITLE_LINK", ilLink::_getLink($item['ref_id'], $item['type']));
$this->tpl->setVariable("TITLE_FRAME", ilFrameTargetInfo::_getFrame('MainContent', $item['type']));
$this->tpl->setVariable("TITLE_LINK_NAME", $item['title']);
} else {
$this->tpl->setVariable("TITLE", $item['title']);
}
if (strlen($item['description'])) {
$this->tpl->setCurrentBlock("item_description");
$this->tpl->setVariable("DESC", $item['description']);
$this->tpl->parseCurrentBlock();
}
if ($tlt = ilMDEducational::_getTypicalLearningTimeSeconds($item['obj_id'])) {
$this->tpl->setCurrentBlock("tlt");
$this->tpl->setVariable("TXT_TLT", $this->lng->txt('meta_typical_learning_time'));
$this->tpl->setVariable("TLT_VAL", ilFormat::_secondsToString($tlt));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("container_standard_row");
// Suggested
if (is_array($_POST['item']["{$item['ref_id']}"]['sug_start'])) {
$start = $this->__toUnix($_POST['item']["{$item['ref_id']}"]['sug_start']);
} else {
$start = $item['suggestion_start'];
}
$end = $item['suggestion_end'];
$date = $this->__prepareDateSelect($start);
$this->tpl->setVariable("SUG_START", ilUtil::makeDateSelect($item_prefix . "[sug_start]", $date['y'], $date['m'], $date['d'], date('Y', time()), false));
$this->tpl->setVariable("NAME_DURATION_A", $item_prefix . "[duration_a]");
if (isset($_POST['item']["{$item['ref_id']}"]['duration_a'])) {
$this->tpl->setVariable("VAL_DURATION_A", abs($_POST['item']["{$item['ref_id']}"]['duration_a']));
} else {
$this->tpl->setVariable("VAL_DURATION_A", intval(($end - $start) / (60 * 60 * 24)));
}
$this->tpl->setVariable('SUG_END', ilDatePresentation::formatDate(new ilDate($item['suggestion_end'], IL_CAL_UNIX)));
// Limit
if (is_array($_POST['item']["{$item['ref_id']}"]['lim_end'])) {
$end = $this->__toUnix($_POST['item']["{$item['ref_id']}"]['lim_end']);
} else {
$end = $item['latest_end'];
}
$date = $this->__prepareDateSelect($end);
$this->tpl->setVariable("LIM_END", ilUtil::makeDateSelect($item_prefix . "[lim_end]", $date['y'], $date['m'], $date['d'], date('Y', time()), false));
$this->tpl->setVariable("NAME_CHANGE", $item_change_prefix . "[change]");
$this->tpl->setVariable("NAME_ACTIVE", $item_active_prefix . "[active]");
if (isset($_POST['item'])) {
$change = $_POST['item_change']["{$item['ref_id']}"]['change'];
$active = $_POST['item_active']["{$item['ref_id']}"]['active'];
} else {
$change = $item['changeable'];
$active = $item['timing_type'] == ilObjectActivation::TIMINGS_PRESETTING;
}
$this->tpl->setVariable("CHECKED_ACTIVE", $active ? 'checked="checked"' : '');
$this->tpl->setVariable("CHECKED_CHANGE", $change ? 'checked="checked"' : '');
if (isset($this->failed["{$item['ref_id']}"])) {
$this->tpl->setVariable("ROWCLASS", 'tblrowmarked');
} else {
$this->tpl->setVariable("ROWCLASS", ilUtil::switchColor($counter++, 'tblrow1', 'tblrow2'));
}
$this->tpl->parseCurrentBlock();
}
// Select all
$this->tpl->setVariable("CHECKCLASS", ilUtil::switchColor($counter++, 'tblrow1', 'tblrow2'));
//.........这里部分代码省略.........