当前位置: 首页>>代码示例>>PHP>>正文


PHP DocumentTemplate::moduleBody方法代码示例

本文整理汇总了PHP中TYPO3\CMS\Backend\Template\DocumentTemplate::moduleBody方法的典型用法代码示例。如果您正苦于以下问题:PHP DocumentTemplate::moduleBody方法的具体用法?PHP DocumentTemplate::moduleBody怎么用?PHP DocumentTemplate::moduleBody使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TYPO3\CMS\Backend\Template\DocumentTemplate的用法示例。


在下文中一共展示了DocumentTemplate::moduleBody方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: main

 /**
  * Generate module output
  *
  * @return void
  */
 public function main()
 {
     // Start history object
     $historyObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\History\\RecordHistory');
     // Get content:
     $this->content .= $historyObj->main();
     // Setting up the buttons and markers for docheader
     $docHeaderButtons = $this->getButtons();
     $markers['CONTENT'] = $this->content;
     $markers['CSH'] = $docHeaderButtons['csh'];
     // Build the <body> for the module
     $this->content = $this->doc->startPage($GLOBALS['LANG']->getLL('title'));
     $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:19,代码来源:ElementHistoryController.php

示例2: render

 /**
  * The main render method
  *
  * Gathers all content and returns it
  *
  * @return string
  */
 public function render()
 {
     $docHeaderButtons = array();
     // Check if the referenced record is available
     $this->recordIsAvailable = $this->repository->hasRecord();
     if ($this->recordIsAvailable) {
         // Load necessary JavaScript
         $this->loadJavascript();
         // Load necessary CSS
         $this->loadCss();
         // Load the settings
         $this->loadSettings();
         // Localization
         $this->loadLocalization();
         // Setting up the buttons and markers for docheader
         $docHeaderButtons = $this->getButtons();
         $markers['CSH'] = $docHeaderButtons['csh'];
         // Hook
         $this->callRenderHook();
     }
     // Getting the body content
     $markers['CONTENT'] = $this->getBodyContent();
     // Build the HTML for the module
     $content = $this->doc->startPage($this->getLanguageService()->getLL('title', true));
     $content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markers);
     $content .= $this->doc->endPage();
     return $this->doc->insertStylesAndJS($content);
 }
开发者ID:rickymathew,项目名称:TYPO3.CMS,代码行数:35,代码来源:WizardView.php

示例3: main

 /**
  * Main function of the module. Write the content to $this->content.
  *
  * @return void
  */
 public function main()
 {
     $backendUser = $this->getBackendUser();
     $language = $this->getLanguageService();
     // Access check!
     // The page will show only if there is a valid page and if
     // this page may be viewed by the user
     $this->pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->id, $this->perms_clause);
     $access = is_array($this->pageinfo);
     // Checking access:
     if ($this->id && $access || $backendUser->isAdmin()) {
         // Render content:
         $this->moduleContent();
     } else {
         // If no access or if ID == zero
         $this->content .= $this->doc->header($language->getLL('statistic'));
     }
     $docHeaderButtons = $this->getHeaderButtons();
     $markers = array('CSH' => $docHeaderButtons['csh'], 'CONTENT' => $this->content);
     $markers['FUNC_MENU'] = $this->doc->funcMenu('', \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']));
     // put it all together
     $this->content = $this->doc->startPage($language->getLL('statistic'));
     $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
     $this->content .= $this->doc->endPage();
     $this->content = $this->doc->insertStylesAndJS($this->content);
 }
开发者ID:BenjaminBeck,项目名称:commerce,代码行数:31,代码来源:StatisticModuleController.php

示例4: main

 /**
  * Main function to generate the content
  *
  * @return 	void
  * @todo Define visibility
  */
 public function main()
 {
     $this->content = $this->doc->header('Indexing Engine Statistics');
     $this->content .= $this->doc->spacer(5);
     switch ($this->MOD_SETTINGS['function']) {
         case 'stat':
             $this->content .= $this->doc->section('Records', $this->doc->table($this->getRecordsNumbers()), 0, 1);
             $this->content .= $this->doc->spacer(15);
             $this->content .= $this->doc->section('index_phash TYPES', $this->doc->table($this->getPhashTypes()), 1);
             $this->content .= $this->doc->spacer(15);
             break;
         case 'externalDocs':
             $this->content .= $this->doc->section('External documents', $this->doc->table($this->getPhashExternalDocs()), 0, 1);
             $this->content .= $this->doc->spacer(15);
             break;
         case 'typo3pages':
             $this->content .= $this->doc->section('TYPO3 Pages', $this->doc->table($this->getPhashT3pages()), 0, 1);
             $this->content .= $this->doc->spacer(15);
             break;
     }
     $docHeaderButtons = $this->getButtons();
     $markers = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => BackendUtility::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), 'CONTENT' => $this->content);
     $this->content = $this->doc->startPage('Indexing Engine Statistics');
     $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
     $this->content .= $this->doc->endPage();
     $this->content = $this->doc->insertStylesAndJS($this->content);
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:33,代码来源:ModuleController.php

示例5: main

    /**
     * Main function, rendering the browsable page tree
     *
     * @return	void
     */
    public function main()
    {
        $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'doktype = 254 AND module in (\'dmail\')' . BackendUtility::deleteClause('pages'), '', 'title');
        $out = '';
        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
            if (BackendUtility::readPageAccess($row['uid'], $GLOBALS['BE_USER']->getPagePermsClause(1))) {
                $icon = $iconFactory->getIconForRecord('pages', $row, Icon::SIZE_SMALL)->render();
                $out .= '<tr onmouseover="this.style.backgroundColor=\'' . GeneralUtility::modifyHTMLColorAll($this->doc->bgColor, -5) . '\'" onmouseout="this.style.backgroundColor=\'\'">' . '<td id="dmail_' . $row['uid'] . '" >
						<a href="#" onclick="top.fsMod.recentIds[\'txdirectmailM1\']=' . $row['uid'] . ';jumpTo(\'id=' . $row['uid'] . '\',this,\'dmail_' . $row['uid'] . '\');">' . $icon . '&nbsp;' . htmlspecialchars($row['title']) . '</a></td></tr>';
            }
        }
        $GLOBALS['TYPO3_DB']->sql_free_result($res);
        $content = '<table cellspacing="0" cellpadding="0" border="0" width="100%">' . $out . '</table>';
        // Adding highlight - JavaScript
        if ($this->doHighlight) {
            $content .= $this->doc->wrapScriptTags('
			hilight_row("",top.fsMod.navFrameHighlightedID["web"]);
		');
        }
        $docHeaderButtons = array('CSH' => BackendUtility::cshItem('_MOD_txdirectmailM1', 'folders', $GLOBALS['BACK_PATH'], TRUE), 'REFRESH' => '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('unique' => uniqid('directmail_navframe')))) . '">' . $iconFactory->getIcon('actions-refresh', Icon::SIZE_SMALL) . '</a>');
        $markers = array('HEADLINE' => '', 'CONTENT' => $this->getLanguageService()->getLL('dmail_folders') . $content);
        // Build the <body> for the module
        $this->content = $this->doc->startPage('TYPO3 Direct Mail Navigation');
        $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
    }
开发者ID:Teddytrombone,项目名称:direct_mail,代码行数:31,代码来源:NavFrame.php

示例6: main

    /**
     * Main function, rendering the browsable page tree
     *
     * @return 	void
     * @todo Define visibility
     */
    public function main()
    {
        // Produce browse-tree:
        $tree = $this->pagetree->getBrowsableTree();
        // Outputting Temporary DB mount notice:
        if ($this->active_tempMountPoint) {
            $flashText = '
				<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('setTempDBmount' => 0))) . '">' . $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_core.xml:labels.temporaryDBmount', 1) . '</a>		<br />' . $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_core.xml:labels.path', 1) . ': <span title="' . htmlspecialchars($this->active_tempMountPoint['_thePathFull']) . '">' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($this->active_tempMountPoint['_thePath'], -50)) . '</span>
			';
            $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $flashText, '', \TYPO3\CMS\Core\Messaging\FlashMessage::INFO);
            $this->content .= $flashMessage->render();
        }
        // Outputting page tree:
        $this->content .= '<div id="PageTreeDiv">' . $tree . '</div>';
        // Adding javascript for drag & drop activation and highlighting
        $this->content .= $this->doc->wrapScriptTags('
			' . ($this->doHighlight ? 'Tree.highlightActiveItem("",top.fsMod.navFrameHighlightedID["web"]);' : '') . '
			Tree.registerDragDropHandlers();');
        // Setting up the buttons and markers for docheader
        $docHeaderButtons = $this->getButtons();
        $markers = array('IMG_RESET' => \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-close', array('id' => 'treeFilterReset', 'alt' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.resetFilter'), 'title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.resetFilter'))), 'WORKSPACEINFO' => $this->getWorkspaceInfo(), 'CONTENT' => $this->content);
        $subparts = array();
        if (!$this->hasFilterBox) {
            $subparts['###SECOND_ROW###'] = '';
        }
        // Build the <body> for the module
        $this->content = $this->doc->startPage('TYPO3 Page Tree');
        $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers, $subparts);
        $this->content .= $this->doc->endPage();
        $this->content = $this->doc->insertStylesAndJS($this->content);
    }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:37,代码来源:PageTreeNavigationController.php

示例7: main

 /**
  * Main
  *
  * @return void
  * @todo Define visibility
  */
 public function main()
 {
     // Content creation
     if (!$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableTopMenu']) {
         $this->menu = BackendUtility::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
     }
     switch ($this->MOD_SETTINGS['function']) {
         case 'search':
             $this->func_search();
             break;
         case 'records':
             $this->func_records();
             break;
         case 'relations':
             $this->func_relations();
             break;
         case 'refindex':
             $this->func_refindex();
             break;
         default:
             $this->func_default();
     }
     // Setting up the buttons and markers for docheader
     $docHeaderButtons = $this->getButtons();
     $markers = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => $this->getFuncMenu(), 'CONTENT' => $this->content);
     // Build the <body> for the module
     $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
     // Renders the module page
     $this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $this->content);
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:36,代码来源:DatabaseIntegrityView.php

示例8: flush

 /**
  * Flushes the rendered content to browser.
  *
  * @return 	void
  */
 public function flush()
 {
     $content = $this->doc->moduleBody($this->pageRecord, $this->getDocHeaderButtons(), $this->getTemplateMarkers());
     // Renders the module page
     $content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $content);
     $this->content = NULL;
     $this->doc = NULL;
     echo $content;
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:14,代码来源:RecyclerModuleController.php

示例9: main

 /**
  * Main function, rendering the browsable page tree
  *
  * @return void
  */
 public function main()
 {
     // Produce browse-tree:
     $tree = $this->pagetree->getBrowsableTree();
     $docHeaderButtons = $this->getButtons();
     $markers = array('IMG_RESET' => '', 'WORKSPACEINFO' => '', 'CONTENT' => $tree);
     // Build the <body> for the module
     $this->content = $this->doc->startPage($this->getLanguageService()->sl('LLL:EXT:commerce/Resources/Private/Language/locallang_be.xml:mod_orders.navigation_title'));
     $this->content .= $this->doc->moduleBody('', $docHeaderButtons, $markers);
     $this->content .= $this->doc->endPage();
     $this->content = $this->doc->insertStylesAndJS($this->content);
 }
开发者ID:AndreasA,项目名称:commerce,代码行数:17,代码来源:OrdersViewHelper.php

示例10: main

 /**
  * Initialize module header etc and call extObjContent function
  *
  * @return void
  */
 public function main()
 {
     // Access check...
     // The page will show only if there is a valid page and if this page may be viewed by the user
     $this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause);
     $access = is_array($this->pageinfo);
     if ($this->id && $access || $GLOBALS['BE_USER']->user['admin'] && !$this->id) {
         if ($GLOBALS['BE_USER']->user['admin'] && !$this->id) {
             $this->pageinfo = array('title' => '[root-level]', 'uid' => 0, 'pid' => 0);
         }
         $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
         $this->doc->backPath = $GLOBALS['BACK_PATH'];
         $this->doc->setModuleTemplate('EXT:info/Resources/Private/Templates/info.html');
         $this->doc->tableLayout = array('0' => array('0' => array('<td valign="top"><strong>', '</strong></td>'), 'defCol' => array('<td><img src="' . $this->doc->backPath . 'clear.gif" width="10" height="1" alt="" /></td><td valign="top"><strong>', '</strong></td>')), 'defRow' => array('0' => array('<td valign="top">', '</td>'), 'defCol' => array('<td><img src="' . $this->doc->backPath . 'clear.gif" width="10" height="1" alt="" /></td><td valign="top">', '</td>')));
         // JavaScript
         $this->doc->postCode = $this->doc->wrapScriptTags('if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int) $this->id . ';');
         // Setting up the context sensitive menu:
         $this->doc->getContextMenuCode();
         $this->doc->form = '<form action="' . htmlspecialchars(BackendUtility::getModuleUrl('web_info')) . '" method="post" name="webinfoForm">';
         $vContent = $this->doc->getVersionSelector($this->id, 1);
         if ($vContent) {
             $this->content .= $this->doc->section('', $vContent);
         }
         $this->extObjContent();
         // Setting up the buttons and markers for docheader
         $docHeaderButtons = $this->getButtons();
         $markers = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), 'CONTENT' => $this->content);
         // Build the <body> for the module
         $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
     } else {
         // If no access or if ID == zero
         $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
         $this->doc->backPath = $GLOBALS['BACK_PATH'];
         $this->content = $this->doc->header($GLOBALS['LANG']->getLL('title'));
         $this->content .= $this->doc->spacer(5);
         $this->content .= $this->doc->spacer(10);
     }
     // Renders the module page
     $this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $this->content);
 }
开发者ID:Mr-Robota,项目名称:TYPO3.CMS,代码行数:45,代码来源:InfoModuleController.php

示例11: main

    /**
     * Main function, creating the content for the access editing forms/listings
     *
     * @return void
     */
    public function main()
    {
        // Access check...
        // The page will show only if there is a valid page and if this page may be viewed by the user
        $this->pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->id, $this->perms_clause);
        $access = is_array($this->pageinfo);
        // Checking access:
        if ($this->id && $access || $GLOBALS['BE_USER']->isAdmin() && !$this->id) {
            if ($GLOBALS['BE_USER']->isAdmin() && !$this->id) {
                $this->pageinfo = array('title' => '[root-level]', 'uid' => 0, 'pid' => 0);
            }
            // This decides if the editform can and will be drawn:
            $this->editingAllowed = $this->pageinfo['perms_userid'] == $GLOBALS['BE_USER']->user['uid'] || $GLOBALS['BE_USER']->isAdmin();
            $this->edit = $this->edit && $this->editingAllowed;
            // If $this->edit then these functions are called in the end of the page...
            if ($this->edit) {
                $this->doc->postCode .= $this->doc->wrapScriptTags('
					setCheck("check[perms_user]", "data[pages][' . $this->id . '][perms_user]");
					setCheck("check[perms_group]", "data[pages][' . $this->id . '][perms_group]");
					setCheck("check[perms_everybody]", "data[pages][' . $this->id . '][perms_everybody]");
				');
            }
            // Draw the HTML page header.
            $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('permissions') . ($this->edit ? ': ' . $GLOBALS['LANG']->getLL('Edit') : ''));
            $this->content .= $this->doc->spacer(5);
            $vContent = $this->doc->getVersionSelector($this->id, 1);
            if ($vContent) {
                $this->content .= $this->doc->section('', $vContent);
            }
            // Main function, branching out:
            if (!$this->edit) {
                $this->notEdit();
            } else {
                $this->doEdit();
            }
            $docHeaderButtons = $this->getButtons();
            $markers['CSH'] = $this->docHeaderButtons['csh'];
            $markers['FUNC_MENU'] = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[mode]', $this->MOD_SETTINGS['mode'], $this->MOD_MENU['mode']);
            $markers['CONTENT'] = $this->content;
            // Build the <body> for the module
            $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
        } else {
            // If no access or if ID == zero
            $this->content = $this->doc->header($GLOBALS['LANG']->getLL('permissions'));
        }
        // Renders the module page
        $this->content = $this->doc->render($GLOBALS['LANG']->getLL('permissions'), $this->content);
    }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:53,代码来源:PermissionModuleController.php

示例12: main

 /**
  * Main function, rendering the folder tree
  *
  * @return void
  */
 public function main()
 {
     // Produce browse-tree:
     $tree = $this->foldertree->getBrowsableTree();
     // Outputting page tree:
     $this->content .= $tree;
     // Setting up the buttons and markers for docheader
     $docHeaderButtons = $this->getButtons();
     $markers = array('CONTENT' => $this->content);
     $subparts = array();
     // Build the <body> for the module
     $this->content = $this->doc->startPage('TYPO3 Folder Tree');
     $this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markers, $subparts);
     $this->content .= $this->doc->endPage();
     $this->content = $this->doc->insertStylesAndJS($this->content);
 }
开发者ID:Gregpl,项目名称:TYPO3.CMS,代码行数:21,代码来源:FileSystemNavigationFrameController.php

示例13: main

 /**
  * Main function, rendering the upload file form fields
  *
  * @return void
  */
 public function main()
 {
     // Make page header:
     $this->content = $this->doc->startPage($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:file_upload.php.pagetitle'));
     $form = $this->renderUploadForm();
     $pageContent = $this->doc->header($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:file_upload.php.pagetitle')) . $this->doc->section('', $form);
     // Header Buttons
     $docHeaderButtons = array('csh' => BackendUtility::cshItem('xMOD_csh_corebe', 'file_upload'), 'back' => '');
     $markerArray = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => '', 'CONTENT' => $pageContent, 'PATH' => $this->title);
     // Back
     if ($this->returnUrl) {
         $docHeaderButtons['back'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', true) . '">' . $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL)->render() . '</a>';
     }
     $this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
     $this->content .= $this->doc->endPage();
     $this->content = $this->doc->insertStylesAndJS($this->content);
 }
开发者ID:hlop,项目名称:TYPO3.CMS,代码行数:22,代码来源:FileUploadController.php

示例14: main

 /**
  * Main function, rendering the upload file form fields
  *
  * @return void
  */
 public function main()
 {
     // Make page header:
     $this->content = $this->doc->startPage($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_upload.php.pagetitle'));
     $form = $this->renderUploadForm();
     $pageContent = $this->doc->header($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_upload.php.pagetitle')) . $this->doc->section('', $form);
     // Header Buttons
     $docHeaderButtons = array('csh' => BackendUtility::cshItem('xMOD_csh_corebe', 'file_upload', $GLOBALS['BACK_PATH']), 'back' => '');
     $markerArray = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), 'CONTENT' => $pageContent, 'PATH' => $this->title);
     // Back
     if ($this->returnUrl) {
         $docHeaderButtons['back'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
     }
     $this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
     $this->content .= $this->doc->endPage();
     $this->content = $this->doc->insertStylesAndJS($this->content);
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:22,代码来源:FileUploadController.php

示例15: main

 /**
  * Initialize module header etc and call extObjContent function
  *
  * @return void
  */
 public function main()
 {
     // Access check...
     // The page will show only if there is a valid page and if this page may be viewed by the user
     $this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause);
     $access = is_array($this->pageinfo);
     // Template markers
     $markers = array('CSH' => '', 'FUNC_MENU' => '', 'CONTENT' => '');
     $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->setModuleTemplate('EXT:func/Resources/Private/Templates/func.html');
     // Main
     if ($this->id && $access) {
         // JavaScript
         $this->doc->postCode = $this->doc->wrapScriptTags('if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int) $this->id . ';');
         // Setting up the context sensitive menu:
         $this->doc->getContextMenuCode();
         $this->doc->form = '<form action="' . htmlspecialchars(BackendUtility::getModuleUrl('web_func')) . '" method="post"><input type="hidden" name="id" value="' . htmlspecialchars($this->id) . '" />';
         $vContent = $this->doc->getVersionSelector($this->id, TRUE);
         if ($vContent) {
             $this->content .= $this->doc->section('', $vContent);
         }
         $this->extObjContent();
         // Setting up the buttons and markers for docheader
         $docHeaderButtons = $this->getButtons();
         $markers['CSH'] = $docHeaderButtons['csh'];
         $markers['FUNC_MENU'] = BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
         $markers['CONTENT'] = $this->content;
     } else {
         // If no access or if ID == zero
         $title = $this->getLanguageService()->getLL('title');
         $message = $this->getLanguageService()->getLL('clickAPage_content');
         $view = GeneralUtility::makeInstance(StandaloneView::class);
         $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:func/Resources/Private/Templates/InfoBox.html'));
         $view->assignMultiple(array('title' => $title, 'message' => $message, 'state' => InfoboxViewHelper::STATE_INFO));
         $this->content = $view->render();
         // Setting up the buttons and markers for docheader
         $docHeaderButtons = $this->getButtons();
         $markers['CSH'] = $docHeaderButtons['csh'];
         $markers['CONTENT'] = $this->content;
     }
     // Build the <body> for the module
     $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
     // Renders the module page
     $this->content = $this->doc->render($this->getLanguageService()->getLL('title'), $this->content);
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:51,代码来源:PageFunctionsController.php


注:本文中的TYPO3\CMS\Backend\Template\DocumentTemplate::moduleBody方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。