本文整理汇总了PHP中TYPO3\CMS\Backend\Template\ModuleTemplate::spacer方法的典型用法代码示例。如果您正苦于以下问题:PHP ModuleTemplate::spacer方法的具体用法?PHP ModuleTemplate::spacer怎么用?PHP ModuleTemplate::spacer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Backend\Template\ModuleTemplate
的用法示例。
在下文中一共展示了ModuleTemplate::spacer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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 ($this->getBackendUser()->isAdmin()) {
// Set the form
$this->moduleTemplate->setForm('<form name="tx_scheduler_form" id="tx_scheduler_form" method="post" action="">');
// Prepare main content
$this->content = '<h1>' . $this->getLanguageService()->getLL('function.' . $this->MOD_SETTINGS['function']) . '</h1>';
$this->content .= $this->getModuleContent();
} else {
// If no access, only display the module's title
$this->content = '<h1>' . $this->getLanguageService()->getLL('title.') . '</h1>';
$this->content .= $this->moduleTemplate->spacer(5);
}
$this->getButtons();
$this->getModuleMenu();
$this->content = $this->getFlashMessages() . $this->content;
}
示例2: 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 .= $this->moduleTemplate->spacer(5);
$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();
}