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


PHP ModuleTemplate::sectionHeader方法代码示例

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


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

示例1: main

 /**
  * Main module function
  *
  * @throws \BadFunctionCallException
  * @throws \InvalidArgumentException
  * @return void
  */
 public function main()
 {
     $this->lang->includeLLFile('EXT:impexp/Resources/Private/Language/locallang.xlf');
     // Start document template object:
     // We keep this here, in case somebody relies on the old doc being here
     $this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
     $this->doc->bodyTagId = 'imp-exp-mod';
     $this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause);
     $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);
     // Setting up the context sensitive menu:
     $this->moduleTemplate->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/ClickMenu');
     $this->moduleTemplate->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Impexp/ImportExport');
     $this->moduleTemplate->addJavaScriptCode('ImpexpInLineJS', 'if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int) $this->id . ';');
     $this->moduleTemplate->setForm('<form action="' . htmlspecialchars(BackendUtility::getModuleUrl('xMOD_tximpexp')) . '" method="post" enctype="multipart/form-data">' . '<input type="hidden" name="id" value="' . $this->id . '" />');
     // Input data grabbed:
     $inData = GeneralUtility::_GP('tx_impexp');
     $this->content .= $this->moduleTemplate->sectionHeader($this->lang->getLL('title_' . (string) $inData['action']));
     $this->content .= '<div style="padding-top: 5px;"></div>';
     $this->checkUpload();
     switch ((string) $inData['action']) {
         case 'export':
             $this->shortcutName = $this->lang->getLL('title_export');
             // Finally: If upload went well, set the new file as the thumbnail in the $inData array:
             if (!empty($this->uploadedFiles[0])) {
                 $inData['meta']['thumbnail'] = $this->uploadedFiles[0]->getCombinedIdentifier();
             }
             // Call export interface
             $this->exportData($inData);
             break;
         case 'import':
             $this->shortcutName = $this->lang->getLL('title_import');
             // Finally: If upload went well, set the new file as the import file:
             if (!empty($this->uploadedFiles[0])) {
                 // Only allowed extensions....
                 if (GeneralUtility::inList('t3d,xml', $this->uploadedFiles[0]->getExtension())) {
                     $inData['file'] = $this->uploadedFiles[0]->getCombinedIdentifier();
                 }
             }
             // Call import interface:
             $this->importData($inData);
             break;
     }
     // Setting up the buttons and markers for docheader
     $this->getButtons();
 }
开发者ID:Audibene-GMBH,项目名称:TYPO3.CMS,代码行数:52,代码来源:ImportExportController.php


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