本文整理汇总了PHP中TYPO3\CMS\Backend\Template\ModuleTemplate::setBodyTag方法的典型用法代码示例。如果您正苦于以下问题:PHP ModuleTemplate::setBodyTag方法的具体用法?PHP ModuleTemplate::setBodyTag怎么用?PHP ModuleTemplate::setBodyTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Backend\Template\ModuleTemplate
的用法示例。
在下文中一共展示了ModuleTemplate::setBodyTag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initPage
/**
* initialization for the visual parts of the class
* Use template rendering only if this is a non-AJAX call
*
* @return void
*/
public function initPage()
{
// Setting highlight mode:
$this->doHighlight = !$this->getBackendUser()->getTSConfigVal('options.pageTree.disableTitleHighlight');
$this->moduleTemplate->setBodyTag('<body id="ext-backend-Modules-FileSystemNavigationFrame-index-php">');
// Adding javascript code for drag&drop and the filetree as well as the click menu code
$dragDropCode = '
Tree.ajaxID = "sc_alt_file_navframe_expandtoggle";
Tree.registerDragDropHandlers()';
if ($this->doHighlight) {
$hlClass = $this->getBackendUser()->workspace === 0 ? 'active' : 'active active-ws wsver' . $GLOBALS['BE_USER']->workspace;
$dragDropCode .= '
Tree.highlightClass = "' . $hlClass . '";
Tree.highlightActiveItem("", top.fsMod.navFrameHighlightedID["file"]);
';
}
// Adding javascript for drag & drop activation and highlighting
$pageRenderer = $this->moduleTemplate->getPageRenderer();
$pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ClickMenu');
$pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/LegacyTree', 'function() {
DragDrop.table = "folders";
' . $dragDropCode . '
}');
// Setting JavaScript for menu.
$inlineJs = ($this->currentSubScript ? 'top.currentSubScript=unescape("' . rawurlencode($this->currentSubScript) . '");' : '') . '
// Function, loading the list frame from navigation tree:
function jumpTo(id, linkObj, highlightID, bank) {
var theUrl = top.currentSubScript;
if (theUrl.indexOf("?") != -1) {
theUrl += "&id=" + id
} else {
theUrl += "?id=" + id
}
top.fsMod.currentBank = bank;
top.TYPO3.Backend.ContentContainer.setUrl(theUrl);
' . ($this->doHighlight ? 'Tree.highlightActiveItem("file", highlightID + "_" + bank);' : '') . '
if (linkObj) { linkObj.blur(); }
return false;
}
' . ($this->cMR ? ' jumpTo(top.fsMod.recentIds[\'file\'],\'\');' : '');
$this->moduleTemplate->getPageRenderer()->addJsInlineCode('FileSystemNavigationFrame', $inlineJs);
}