本文整理匯總了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);
}