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


PHP DocumentTemplate::section方法代码示例

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


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

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

示例2: renderReferences

 protected function renderReferences()
 {
     $content = '';
     switch ($this->type) {
         case 'db':
             $references = $this->makeRef($this->table, $this->row['uid']);
             if (!empty($references)) {
                 $content .= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:show_item.php.referencesToThisItem'), $references);
             }
             $referencesFrom = $this->makeRefFrom($this->table, $this->row['uid']);
             if (!empty($referencesFrom)) {
                 $content .= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:show_item.php.referencesFromThisItem'), $referencesFrom);
             }
             break;
         case 'file':
             if ($this->fileObject && $this->fileObject->isIndexed()) {
                 $references = $this->makeRef('_FILE', $this->fileObject);
                 if (!empty($references)) {
                     $header = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:show_item.php.referencesToThisItem');
                     $content .= $this->doc->section($header, $references);
                 }
             }
             break;
     }
     return $content;
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:26,代码来源:ElementInformationController.php

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

示例4: renderFileInfo

    /**
     * Main function. Will generate the information to display for the item
     * set internally.
     *
     * @param string $returnLinkTag <a> tag closing/returning.
     * @return void
     * @todo Define visibility
     */
    public function renderFileInfo($returnLinkTag)
    {
        $fileExtension = $this->fileObject->getExtension();
        $code = '<div class="fileInfoContainer">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForFile($fileExtension) . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.file', TRUE) . ':</strong> ' . $this->fileObject->getName() . '&nbsp;&nbsp;' . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.filesize') . ':</strong> ' . \TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($this->fileObject->getSize()) . '</div>
			';
        $this->content .= $this->doc->section('', $code);
        $this->content .= $this->doc->divider(2);
        // If the file was an image...
        // @todo: add this check in the domain model, or in the processing folder
        if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $fileExtension)) {
            // @todo: find a way to make getimagesize part of the t3lib_file object
            $imgInfo = @getimagesize($this->fileObject->getForLocalProcessing(FALSE));
            $thumbUrl = $this->fileObject->process(\TYPO3\CMS\Core\Resource\ProcessedFile::CONTEXT_IMAGEPREVIEW, array('width' => '150m', 'height' => '150m'))->getPublicUrl(TRUE);
            $code = '<div class="fileInfoContainer fileDimensions">' . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.dimensions') . ':</strong> ' . $imgInfo[0] . 'x' . $imgInfo[1] . ' ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.pixels') . '</div>';
            $code .= '<br />
				<div align="center">' . $returnLinkTag . '<img src="' . $thumbUrl . '" alt="' . htmlspecialchars(trim($this->fileObject->getName())) . '" title="' . htmlspecialchars(trim($this->fileObject->getName())) . '" /></a></div>';
            $this->content .= $this->doc->section('', $code);
        } elseif ($fileExtension == 'ttf') {
            $thumbUrl = $this->fileObject->process(\TYPO3\CMS\Core\Resource\ProcessedFile::CONTEXT_IMAGEPREVIEW, array('width' => '530m', 'height' => '600m'))->getPublicUrl(TRUE);
            $thumb = '<br />
				<div align="center">' . $returnLinkTag . '<img src="' . $thumbUrl . '" border="0" title="' . htmlspecialchars(trim($this->fileObject->getName())) . '" alt="" /></a></div>';
            $this->content .= $this->doc->section('', $thumb);
        }
        // Traverse the list of fields to display for the record:
        $tableRows = array();
        $showRecordFieldList = $GLOBALS['TCA'][$this->table]['interface']['showRecordFieldList'];
        $fieldList = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $showRecordFieldList, TRUE);
        foreach ($fieldList as $name) {
            $name = trim($name);
            if (!isset($GLOBALS['TCA'][$this->table]['columns'][$name])) {
                continue;
            }
            $isExcluded = !(!$GLOBALS['TCA'][$this->table]['columns'][$name]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields', $this->table . ':' . $name));
            if ($isExcluded) {
                continue;
            }
            $uid = $this->row['uid'];
            $itemValue = \TYPO3\CMS\Backend\Utility\BackendUtility::getProcessedValue($this->table, $name, $this->row[$name], 0, 0, FALSE, $uid);
            $itemLabel = $GLOBALS['LANG']->sL(\TYPO3\CMS\Backend\Utility\BackendUtility::getItemLabel($this->table, $name), 1);
            $tableRows[] = '
				<tr>
					<td class="t3-col-header">' . $itemLabel . '</td>
					<td>' . htmlspecialchars($itemValue) . '</td>
				</tr>';
        }
        // Create table from the information:
        $tableCode = '
			<table border="0" cellpadding="0" cellspacing="0" id="typo3-showitem" class="t3-table-info">
				' . implode('', $tableRows) . '
			</table>';
        $this->content .= $this->doc->section('', $tableCode);
        // References:
        if ($this->fileObject->isIndexed()) {
            $header = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.referencesToThisItem');
            $this->content .= $this->doc->section($header, $this->makeRef('_FILE', $this->fileObject));
        }
    }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:65,代码来源:ElementInformationController.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) {
         $this->CALC_PERMS = $GLOBALS['BE_USER']->calcPerms($this->pageinfo);
         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:khanhdeux,项目名称:typo3test,代码行数:46,代码来源:InfoModuleController.php

示例6: render

 /**
  * Renders the content of the module.
  *
  * @return 	void
  */
 public function render()
 {
     $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
     $this->content .= $this->doc->section('', $GLOBALS['LANG']->getLL('description'));
     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:nicksergio,项目名称:TYPO3v4-Core,代码行数:18,代码来源:RecyclerModuleController.php

示例7: moduleContent

 /**
  * Generates the module content.
  *
  * @return void
  */
 protected function moduleContent()
 {
     switch ((string) $this->MOD_SETTINGS['function']) {
         case '2':
             $content = $this->getManufacturerListing();
             break;
         case '3':
             $content = $this->getSupplierListing();
             break;
         case '1':
         default:
             $this->modPid = $this->attributePid;
             $content = $this->getAttributeListing();
     }
     $this->content .= $this->doc->section('', $content, 0, 1);
 }
开发者ID:BenjaminBeck,项目名称:commerce,代码行数:21,代码来源:SystemdataModuleController.php

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

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

示例10: main

 /**
  * Main function, rendering the table wizard
  *
  * @return void
  */
 public function main()
 {
     if ($this->P['table'] && $this->P['field'] && $this->P['uid']) {
         $this->content .= $this->doc->section($this->getLanguageService()->getLL('table_title'), $this->tableWizard(), 0, 1);
     } else {
         $this->content .= $this->doc->section($this->getLanguageService()->getLL('table_title'), '<span class="typo3-red">' . $this->getLanguageService()->getLL('table_noData', TRUE) . '</span>', 0, 1);
     }
     // 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->startPage('Table');
     $this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markers);
     $this->content .= $this->doc->endPage();
     $this->content = $this->doc->insertStylesAndJS($this->content);
 }
开发者ID:adrolli,项目名称:TYPO3.CMS,代码行数:22,代码来源:TableController.php

示例11: main

    /**
     * Main Method, rendering either colorpicker or frameset depending on ->showPicker
     *
     * @return 	void
     */
    public function main()
    {
        // Show frameset by default:
        if (!GeneralUtility::_GP('showPicker')) {
            $this->frameSet();
        } else {
            // Putting together the items into a form:
            $content = '
				<form name="colorform" method="post" action="' . htmlspecialchars(BackendUtility::getModuleUrl('wizard_colorpicker')) . '">
					' . $this->colorMatrix() . '
					' . $this->colorList() . '
					' . $this->colorImage() . '

						<!-- Value box: -->
					<p class="c-head">' . $GLOBALS['LANG']->getLL('colorpicker_colorValue', TRUE) . '</p>
					<table border="0" cellpadding="0" cellspacing="3">
						<tr>
							<td><input type="text" ' . $this->doc->formWidth(7) . ' maxlength="10" name="colorValue" value="' . htmlspecialchars($this->colorValue) . '" /></td>
							<td style="background-color:' . htmlspecialchars($this->colorValue) . '; border: 1px solid black;">&nbsp;<span style="color: black;">' . $GLOBALS['LANG']->getLL('colorpicker_black', TRUE) . '</span>&nbsp;<span style="color: white;">' . $GLOBALS['LANG']->getLL('colorpicker_white', TRUE) . '</span>&nbsp;</td>
							<td><input type="submit" name="save_close" value="' . $GLOBALS['LANG']->getLL('colorpicker_setClose', TRUE) . '" /></td>
						</tr>
					</table>

						<!-- Hidden fields with values that has to be kept constant -->
					<input type="hidden" name="showPicker" value="1" />
					<input type="hidden" name="fieldChangeFunc" value="' . htmlspecialchars($this->fieldChangeFunc) . '" />
					<input type="hidden" name="fieldChangeFuncHash" value="' . htmlspecialchars($this->fieldChangeFuncHash) . '" />
					<input type="hidden" name="fieldName" value="' . htmlspecialchars($this->fieldName) . '" />
					<input type="hidden" name="formName" value="' . htmlspecialchars($this->formName) . '" />
					<input type="hidden" name="md5ID" value="' . htmlspecialchars($this->md5ID) . '" />
					<input type="hidden" name="exampleImg" value="' . htmlspecialchars($this->exampleImg) . '" />
				</form>';
            // If the save/close button is clicked, then close:
            if (GeneralUtility::_GP('save_close')) {
                $content .= $this->doc->wrapScriptTags('
					setValue(' . GeneralUtility::quoteJSvalue($this->colorValue) . ');
					parent.close();
				');
            }
            // Output:
            $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('colorpicker_title'), $content, 0, 1);
        }
    }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:48,代码来源:ColorpickerController.php

示例12: getModuleContent

 /**
  * Generate the module's content
  *
  * @return string HTML of the module's main content
  */
 protected function getModuleContent()
 {
     $content = '';
     $sectionTitle = '';
     // Handle chosen action
     switch ((string) $this->MOD_SETTINGS['function']) {
         case 'create':
             $content = $this->kickstarter->mgm_wizard();
             break;
         case 'edit':
             if (!$this->kickstarter->modData['wizArray_ser']) {
                 $this->kickstarter->modData['wizArray_ser'] = base64_encode($this->getWizardFormDat());
             }
             $content .= $this->getEditableExtensionsMenu();
             $content .= $this->kickstarter->mgm_wizard();
             break;
     }
     // Wrap the content in a section
     return $this->doc->section($sectionTitle, '<div class="tx_kickstarter_modfunc1">' . $content . '</div>', 0, 1);
 }
开发者ID:jaguerra,项目名称:TYPO3-Kickstarter,代码行数:25,代码来源:KickstarterModuleController.php

示例13: main

 /**
  * Rendering the content.
  *
  * @return void
  */
 public function main()
 {
     $msg = array();
     // Add a message, telling that no documents were open...
     $msg[] = '<p>' . $GLOBALS['LANG']->getLL('noDocuments_msg', TRUE) . '</p><br />';
     // If another page module was specified, replace the default Page module with the new one
     $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
     $pageModule = \TYPO3\CMS\Backend\Utility\BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
     // Perform some access checks:
     $a_wl = $GLOBALS['BE_USER']->check('modules', 'web_list');
     $a_wp = $GLOBALS['BE_USER']->check('modules', $pageModule);
     // Finding module images: PAGE
     $imgFile = $GLOBALS['LANG']->moduleLabels['tabs_images']['web_layout_tab'];
     $imgInfo = @getimagesize($imgFile);
     $img_web_layout = is_array($imgInfo) ? '<img src="../' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix($imgFile) . '" ' . $imgInfo[3] . ' alt="" />' : '';
     // Finding module images: LIST
     $imgFile = $GLOBALS['LANG']->moduleLabels['tabs_images']['web_list_tab'];
     $imgInfo = @getimagesize($imgFile);
     $img_web_list = is_array($imgInfo) ? '<img src="../' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix($imgFile) . '" ' . $imgInfo[3] . ' alt="" />' : '';
     // If either the Web>List OR Web>Page module are active, show the little message with links to those modules:
     if ($a_wl || $a_wp) {
         $msg_2 = array();
         // Web>Page:
         if ($a_wp) {
             $msg_2[] = '<strong><a href="#" onclick="top.goToModule(\'' . $pageModule . '\'); return false;">' . $GLOBALS['LANG']->getLL('noDocuments_pagemodule', TRUE) . $img_web_layout . '</a></strong>';
             if ($a_wl) {
                 $msg_2[] = $GLOBALS['LANG']->getLL('noDocuments_OR');
             }
         }
         // Web>List
         if ($a_wl) {
             $msg_2[] = '<strong><a href="#" onclick="top.goToModule(\'web_list\'); return false;">' . $GLOBALS['LANG']->getLL('noDocuments_listmodule', TRUE) . $img_web_list . '</a></strong>';
         }
         $msg[] = '<p>' . sprintf($GLOBALS['LANG']->getLL('noDocuments_msg2', 1), implode(' ', $msg_2)) . '</p><br />';
     }
     // Display the list of the most recently edited documents:
     $modObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Opendocs\\Controller\\OpendocsController');
     $msg[] = '<p>' . $GLOBALS['LANG']->getLL('noDocuments_msg3', TRUE) . '</p><br />' . $modObj->renderMenu();
     // Adding the content:
     $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('noDocuments'), implode(' ', $msg), 0, 1);
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:46,代码来源:NoDocumentsOpenController.php

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

示例15: main

    /**
     * Generate the main settings formular:
     *
     * @return void
     * @todo Define visibility
     */
    public function main()
    {
        global $LANG;
        if ($this->languageUpdate) {
            $this->doc->JScodeArray['languageUpdate'] .= '
				if (top.refreshMenu) {
					top.refreshMenu();
				} else {
					top.TYPO3ModuleMenu.refreshMenu();
				}
			';
        }
        if ($this->pagetreeNeedsRefresh) {
            BackendUtility::setUpdateSignal('updatePageTree');
        }
        // Start page:
        $this->doc->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('TYPO3\\CMS\\Backend\\Module\\ModuleLoader');
        $this->loadModules->observeWorkspaces = TRUE;
        $this->loadModules->load($GLOBALS['TBE_MODULES']);
        $this->content .= $this->doc->header($LANG->getLL('UserSettings'));
        // Show if setup was saved
        if ($this->setupIsUpdated && !$this->tempDataIsCleared && !$this->settingsAreResetToDefault) {
            $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $LANG->getLL('setupWasUpdated'), $LANG->getLL('UserSettings'));
            $this->content .= $flashMessage->render();
        }
        // Show if temporary data was cleared
        if ($this->tempDataIsCleared) {
            $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $LANG->getLL('tempDataClearedFlashMessage'), $LANG->getLL('tempDataCleared'));
            $this->content .= $flashMessage->render();
        }
        // Show if temporary data was cleared
        if ($this->settingsAreResetToDefault) {
            $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $LANG->getLL('settingsAreReset'), $LANG->getLL('resetConfiguration'));
            $this->content .= $flashMessage->render();
        }
        // Notice
        if ($this->setupIsUpdated || $this->settingsAreResetToDefault) {
            $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $LANG->getLL('activateChanges'), '', \TYPO3\CMS\Core\Messaging\FlashMessage::INFO);
            $this->content .= $flashMessage->render();
        }
        // If password is updated, output whether it failed or was OK.
        if ($this->passwordIsSubmitted) {
            if ($this->passwordIsUpdated) {
                $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $LANG->getLL('newPassword_ok'), $LANG->getLL('newPassword'));
            } else {
                $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $LANG->getLL('newPassword_failed'), $LANG->getLL('newPassword'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
            }
            $this->content .= $flashMessage->render();
        }
        // Render the menu items
        $menuItems = $this->renderUserSetup();
        $this->content .= $this->doc->getDynTabMenu($menuItems, 'user-setup', FALSE, FALSE, 1, FALSE, 1, $this->dividers2tabs);
        $formToken = $this->formProtection->generateToken('BE user setup', 'edit');
        $this->content .= $this->doc->section('', '<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" />
			<input type="hidden" name="data[clearSessionVars]" value="0" id="clearSessionVars" />');
        // End of wrapper div
        $this->content .= '</div>';
        // 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($LANG->getLL('UserSettings'), $this->content);
    }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:79,代码来源:SetupModuleController.php


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