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


PHP DocumentTemplate::header方法代码示例

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


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

示例1: init

 /**
  * Initialize the module output
  *
  * @return void
  */
 protected function init()
 {
     // Create internal template object
     $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/show_rechis.html');
     // Start the page header
     $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:14,代码来源:ElementHistoryController.php

示例2: render

 /**
  * Renders the content of the module.
  *
  * @return 	void
  */
 public function render()
 {
     $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
     $this->content .= '<p class="lead">' . $GLOBALS['LANG']->getLL('description') . '</p>';
     if ($this->isAccessibleForCurrentUser) {
         $this->loadHeaderData();
         // div container for renderTo
         $this->content .= '<div id="recyclerContent"></div>';
     } else {
         // If no access or if ID == zero
         $this->content .= $this->doc->spacer(10);
     }
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:18,代码来源:RecyclerModuleController.php

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: main

    /**
     * Main function, rendering the content of the rename form
     *
     * @return void
     */
    public function main()
    {
        // Make page header:
        $this->content = $this->doc->startPage($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_rename.php.pagetitle'));
        $pageContent = $this->doc->header($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_rename.php.pagetitle'));
        $pageContent .= $this->doc->spacer(5);
        $pageContent .= $this->doc->divider(5);
        if ($this->fileOrFolderObject instanceof \TYPO3\CMS\Core\Resource\Folder) {
            $fileIdentifier = $this->fileOrFolderObject->getCombinedIdentifier();
        } else {
            $fileIdentifier = $this->fileOrFolderObject->getUid();
        }
        $code = '<form action="tce_file.php" method="post" name="editform">';
        // Making the formfields for renaming:
        $code .= '

			<div id="c-rename">
				<input type="text" name="file[rename][0][target]" value="' . htmlspecialchars($this->fileOrFolderObject->getName()) . '"' . $GLOBALS['TBE_TEMPLATE']->formWidth(40) . ' />
				<input type="hidden" name="file[rename][0][data]" value="' . htmlspecialchars($fileIdentifier) . '" />
			</div>
		';
        // Making submit button:
        $code .= '
			<div id="c-submit">
				<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_rename.php.submit', TRUE) . '" />
				<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.cancel', TRUE) . '" onclick="backToList(); return false;" />
				<input type="hidden" name="redirect" value="' . htmlspecialchars($this->returnUrl) . '" />
				' . \TYPO3\CMS\Backend\Form\FormEngine::getHiddenTokenField('tceAction') . '
			</div>
		';
        $code .= '</form>';
        // Add the HTML as a section:
        $pageContent .= $code;
        $docHeaderButtons = array('back' => '');
        $docHeaderButtons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'file_rename', $GLOBALS['BACK_PATH']);
        // 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>';
        }
        // Add the HTML as a section:
        $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);
        $this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
        $this->content .= $this->doc->endPage();
        $this->content = $this->doc->insertStylesAndJS($this->content);
    }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:50,代码来源:RenameFileController.php

示例10: main

 /**
  * Main function of the module. Write the content to $this->content
  *
  * @return void
  */
 public function main()
 {
     // Access check!
     // The page will show only if user has admin rights
     if ($GLOBALS['BE_USER']->user['admin']) {
         // Set the form
         //$this->doc->form = '<form name="tx_kickstarter_form" id="tx_kickstarter_form" method="post" action="">';
         // Prepare main content
         $this->content = $this->doc->header($GLOBALS['LANG']->getLL('function.' . $this->MOD_SETTINGS['function']));
         $this->content .= $this->getModuleContent();
     } else {
         // If no access, only display the module's title
         $this->content = $this->doc->header($GLOBALS['LANG']->getLL('title'));
         $this->content .= $this->doc->spacer(5);
     }
     // Place content inside template
     $content = $this->doc->moduleBody(array(), $this->getDocHeaderButtons(), $this->getTemplateMarkers());
     // Renders the module page
     $this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $content);
 }
开发者ID:jaguerra,项目名称:TYPO3-Kickstarter,代码行数:25,代码来源:KickstarterModuleController.php

示例11: func_relations

 /**
  * Show list references
  *
  * @return void
  * @todo Define visibility
  */
 public function func_relations()
 {
     global $LANG, $BACK_PATH;
     $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('relations'));
     $admin = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Integrity\\DatabaseIntegrityCheck');
     $admin->genTree_makeHTML = 0;
     $admin->backPath = $BACK_PATH;
     $fkey_arrays = $admin->getGroupFields('');
     $admin->selectNonEmptyRecordsWithFkeys($fkey_arrays);
     $fileTest = $admin->testFileRefs();
     $code = '';
     if (is_array($fileTest['noReferences'])) {
         foreach ($fileTest['noReferences'] as $val) {
             $code .= '<nobr>' . $val[0] . '/<strong>' . $val[1] . '</strong></nobr><br>';
         }
     } else {
         $code = '<p>' . $GLOBALS['LANG']->getLL('no_files_found') . '</p>';
     }
     $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('files_no_ref'), $code, TRUE, TRUE);
     $code = '';
     if (is_array($fileTest['moreReferences'])) {
         foreach ($fileTest['moreReferences'] as $val) {
             $code .= '<nobr>' . $val[0] . '/<strong>' . $val[1] . '</strong>: ' . $val[2] . ' ' . $GLOBALS['LANG']->getLL('references') . '</nobr><br>' . $val[3] . '<br><br>';
         }
     } else {
         $code = '<p>' . $GLOBALS['LANG']->getLL('no_files_found') . '</p>';
     }
     $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('files_many_ref'), $code, TRUE, TRUE);
     $code = '';
     if (is_array($fileTest['noFile'])) {
         ksort($fileTest['noFile']);
         foreach ($fileTest['noFile'] as $val) {
             $code .= '<nobr>' . $val[0] . '/<strong>' . $val[1] . '</strong> ' . $GLOBALS['LANG']->getLL('isMissing') . ' </nobr><br>' . $GLOBALS['LANG']->getLL('referencedFrom') . $val[2] . '<br><br>';
         }
     } else {
         $code = '<p>' . $GLOBALS['LANG']->getLL('no_files_found') . '</p>';
     }
     $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('files_no_file'), $code, TRUE, TRUE);
     $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('select_db'), $admin->testDBRefs($admin->checkSelectDBRefs), TRUE, TRUE);
     $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('group_db'), $admin->testDBRefs($admin->checkGroupDBRefs), TRUE, TRUE);
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:47,代码来源:DatabaseIntegrityView.php

示例12: main

    /**
     * Main function, rendering the content of the rename form
     *
     * @return void
     */
    public function main()
    {
        // Make page header:
        $this->content = $this->doc->startPage($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:file_rename.php.pagetitle'));
        $pageContent = $this->doc->header($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:file_rename.php.pagetitle'));
        if ($this->fileOrFolderObject instanceof \TYPO3\CMS\Core\Resource\Folder) {
            $fileIdentifier = $this->fileOrFolderObject->getCombinedIdentifier();
        } else {
            $fileIdentifier = $this->fileOrFolderObject->getUid();
        }
        $pageContent .= '<form action="' . htmlspecialchars(BackendUtility::getModuleUrl('tce_file')) . '" method="post" name="editform" role="form">';
        // Making the formfields for renaming:
        $pageContent .= '

			<div class="form-group">
				<input class="form-control" type="text" name="file[rename][0][target]" value="' . htmlspecialchars($this->fileOrFolderObject->getName()) . '" ' . $this->getDocumentTemplate()->formWidth(40) . ' />
				<input type="hidden" name="file[rename][0][data]" value="' . htmlspecialchars($fileIdentifier) . '" />
			</div>
		';
        // Making submit button:
        $pageContent .= '
			<div class="form-group">
				<input class="btn btn-primary" type="submit" value="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:file_rename.php.submit', TRUE) . '" />
				<input class="btn btn-danger" type="submit" value="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.cancel', TRUE) . '" onclick="backToList(); return false;" />
				<input type="hidden" name="redirect" value="' . htmlspecialchars($this->returnUrl) . '" />
				' . \TYPO3\CMS\Backend\Form\FormEngine::getHiddenTokenField('tceAction') . '
			</div>
		';
        $pageContent .= '</form>';
        $docHeaderButtons = array('back' => '');
        $docHeaderButtons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'file_rename');
        // 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) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
        }
        // Add the HTML as a section:
        $markerArray = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => '', 'CONTENT' => $pageContent, 'PATH' => $this->title);
        $this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
        $this->content .= $this->doc->endPage();
        $this->content = $this->doc->insertStylesAndJS($this->content);
    }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:46,代码来源:RenameFileController.php

示例13: init

 /**
  * Constructor, initializing internal variables.
  *
  * @return void
  */
 public function init()
 {
     // Setting internal vars:
     $this->sys_language = (int) GeneralUtility::_GP('sys_language');
     $this->page_id = (int) GeneralUtility::_GP('uid');
     $this->table = GeneralUtility::_GP('table');
     $this->R_URI = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
     $this->input_moveUid = GeneralUtility::_GP('moveUid');
     $this->moveUid = $this->input_moveUid ? $this->input_moveUid : $this->page_id;
     $this->makeCopy = GeneralUtility::_GP('makeCopy');
     // Select-pages where clause for read-access:
     $this->perms_clause = $this->getBackendUser()->getPagePermsClause(1);
     // Starting the document template object:
     $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/move_el.html');
     $this->doc->JScode = '';
     // Starting document content (header):
     $this->content = '';
     $this->content .= $this->doc->header($this->getLanguageService()->getLL('movingElement'));
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:26,代码来源:MoveElementController.php

示例14: main

    /**
     * Initialize module header etc and call extObjContent function
     *
     * @return void
     */
    public function main()
    {
        // We leave this here because of dependencies to submodules
        $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
        // 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);
        if ($this->pageinfo) {
            $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);
        }
        $access = is_array($this->pageinfo);
        if ($this->id && $access || $this->backendUser->user['admin'] && !$this->id) {
            if ($this->backendUser->user['admin'] && !$this->id) {
                $this->pageinfo = array('title' => '[root-level]', 'uid' => 0, 'pid' => 0);
            }
            // JavaScript
            $this->moduleTemplate->addJavaScriptCode('WebFuncInLineJS', 'if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int) $this->id . ';
				function jumpToUrl(URL) {
					window.location.href = URL;
					return false;
				}
				');
            // Setting up the context sensitive menu:
            $this->moduleTemplate->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/ClickMenu');
            $this->content .= '<form action="' . htmlspecialchars(BackendUtility::getModuleUrl($this->moduleName)) . '" method="post" id="InfoModuleController" name="webinfoForm" class="form-inline form-inline-spaced">';
            $vContent = $this->moduleTemplate->getVersionSelector($this->id, 1);
            if ($vContent) {
                $this->content .= $this->moduleTemplate->section('', $vContent);
            }
            $this->extObjContent();
            // Setting up the buttons and markers for docheader
            $this->getButtons();
            $this->generateMenu();
            $this->content .= '</form>';
        } else {
            // If no access or if ID == zero
            $this->content = $this->doc->header($this->languageService->getLL('title'));
        }
    }
开发者ID:Gregpl,项目名称:TYPO3.CMS,代码行数:44,代码来源:InfoModuleController.php

示例15: main

 /**
  * Generate the main settings form:
  *
  * @return void
  */
 public function main()
 {
     $this->content .= '<form action="' . BackendUtility::getModuleUrl('user_setup') . '" method="post" id="SetupModuleController" name="usersetup" enctype="multipart/form-data">';
     if ($this->languageUpdate) {
         $this->moduleTemplate->addJavaScriptCode('languageUpdate', '
             if (top && top.TYPO3.ModuleMenu.App) {
                 top.TYPO3.ModuleMenu.App.refreshMenu();
             }
         ');
     }
     if ($this->pagetreeNeedsRefresh) {
         BackendUtility::setUpdateSignal('updatePageTree');
     }
     // Start page:
     $this->moduleTemplate->loadJavascriptLib('sysext/backend/Resources/Public/JavaScript/md5.js');
     // Use a wrapper div
     $this->content .= '<div id="user-setup-wrapper">';
     // Load available backend modules
     $this->loadModules = GeneralUtility::makeInstance(ModuleLoader::class);
     $this->loadModules->observeWorkspaces = true;
     $this->loadModules->load($GLOBALS['TBE_MODULES']);
     $this->content .= $this->doc->header($this->getLanguageService()->getLL('UserSettings'));
     // Show if setup was saved
     if ($this->setupIsUpdated && !$this->settingsAreResetToDefault) {
         $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $this->getLanguageService()->getLL('setupWasUpdated'), $this->getLanguageService()->getLL('UserSettings'));
         $this->content .= $flashMessage->render();
     }
     // Show if temporary data was cleared
     if ($this->settingsAreResetToDefault) {
         $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $this->getLanguageService()->getLL('settingsAreReset'), $this->getLanguageService()->getLL('resetConfiguration'));
         $this->content .= $flashMessage->render();
     }
     // Notice
     if ($this->setupIsUpdated || $this->settingsAreResetToDefault) {
         $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $this->getLanguageService()->getLL('activateChanges'), '', FlashMessage::INFO);
         $this->content .= $flashMessage->render();
     }
     // If password is updated, output whether it failed or was OK.
     if ($this->passwordIsSubmitted) {
         $flashMessage = null;
         switch ($this->passwordIsUpdated) {
             case self::PASSWORD_OLD_WRONG:
                 $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $this->getLanguageService()->getLL('oldPassword_failed'), $this->getLanguageService()->getLL('newPassword'), FlashMessage::ERROR);
                 break;
             case self::PASSWORD_NOT_THE_SAME:
                 $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $this->getLanguageService()->getLL('newPassword_failed'), $this->getLanguageService()->getLL('newPassword'), FlashMessage::ERROR);
                 break;
             case self::PASSWORD_UPDATED:
                 $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $this->getLanguageService()->getLL('newPassword_ok'), $this->getLanguageService()->getLL('newPassword'));
                 break;
         }
         if ($flashMessage) {
             $this->content .= $flashMessage->render();
         }
     }
     // Render user switch
     $this->content .= $this->renderSimulateUserSelectAndLabel();
     // Render the menu items
     $menuItems = $this->renderUserSetup();
     $this->content .= $this->moduleTemplate->getDynamicTabMenu($menuItems, 'user-setup', 1, false, false);
     $formToken = $this->formProtection->generateToken('BE user setup', 'edit');
     $this->content .= '<div>';
     $this->content .= '<input type="hidden" name="simUser" value="' . $this->simUser . '" />
         <input type="hidden" name="formToken" value="' . $formToken . '" />
         <input type="hidden" value="1" name="data[save]" />
         <input type="hidden" name="data[setValuesToDefault]" value="0" id="setValuesToDefault" />';
     $this->content .= '</div>';
     // End of wrapper div
     $this->content .= '</div>';
     // Setting up the buttons and markers for docheader
     $this->getButtons();
     // Build the <body> for the module
     // Renders the module page
     $this->moduleTemplate->setContent($this->content);
     $this->content .= '</form>';
 }
开发者ID:sup7even,项目名称:TYPO3-schulung-Distribution,代码行数:81,代码来源:SetupModuleController.php


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