本文整理汇总了PHP中TYPO3\CMS\Backend\Template\ModuleTemplate::renderContent方法的典型用法代码示例。如果您正苦于以下问题:PHP ModuleTemplate::renderContent方法的具体用法?PHP ModuleTemplate::renderContent怎么用?PHP ModuleTemplate::renderContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Backend\Template\ModuleTemplate
的用法示例。
在下文中一共展示了ModuleTemplate::renderContent方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mainAction
/**
* Injects the request object for the current request or subrequest
* Simply calls main() and writes the content to the response
*
* @param ServerRequestInterface $request the current request
* @param ResponseInterface $response
* @return ResponseInterface the response with the content
*/
public function mainAction(ServerRequestInterface $request, ResponseInterface $response)
{
$GLOBALS['SOBE'] = $this;
$this->main();
$this->moduleTemplate->setContent($this->content);
$response->getBody()->write($this->moduleTemplate->renderContent());
return $response;
}
示例2: main
/**
* Main function, rendering the folder tree
*
* @return void
*/
public function main()
{
// Produce browse-tree:
$tree = $this->foldertree->getBrowsableTree();
// Outputting page tree:
$this->moduleTemplate->setContent($tree);
// Setting up the buttons
$this->getButtons();
// Build the <body> for the module
$this->moduleTemplate->setTitle('TYPO3 Folder Tree');
$this->content = $this->moduleTemplate->renderContent();
}
示例3: mainAction
/**
* Injects the request object for the current request or subrequest
* Then checks for module functions that have hooked in, and renders menu etc.
*
* @param ServerRequestInterface $request the current request
* @param ResponseInterface $response
* @return ResponseInterface the response with the content
*/
public function mainAction(ServerRequestInterface $request, ResponseInterface $response)
{
$GLOBALS['SOBE'] = $this;
$this->init();
// Checking for first level external objects
$this->checkExtObj();
$this->clearCache();
$this->main();
$this->moduleTemplate->setContent($this->content);
$response->getBody()->write($this->moduleTemplate->renderContent());
return $response;
}
示例4: main
/**
* Renders a FlexForm configuration form.
*
* @return void
*/
public function main()
{
$this->languageService->includeLLFile('EXT:image_autoresize/mod1/locallang.xlf');
$this->processData();
$formTag = '<form action="" method="post" name="editform">';
if (version_compare(TYPO3_version, '7.5.99', '>')) {
$this->moduleTemplate->setForm($formTag);
$this->content .= sprintf('<h3>%s</h3>', $this->languageService->getLL('title', true));
$this->addStatisticsAndSocialLink();
} else {
if (version_compare(TYPO3_version, '7.4.99', '<=')) {
$this->initTCEForms();
}
$this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->doc->setModuleTemplate(ExtensionManagementUtility::extPath($this->extKey) . 'mod1/mod_template.html');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->form = $formTag;
$this->content .= $this->doc->header($this->languageService->getLL('title'));
$this->addStatisticsAndSocialLink();
$this->content .= $this->doc->spacer(5);
}
$row = $this->config;
if (version_compare(TYPO3_version, '7.5.0', '>=')) {
$this->fixRecordForFormEngine($row, array('file_types', 'usergroup'));
$this->moduleContent($row);
} else {
if ($row['rulesets']) {
/** @var $flexObj \TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools */
$flexObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Configuration\\FlexForm\\FlexFormTools');
$row['rulesets'] = $flexObj->flexArray2Xml($row['rulesets'], true);
}
$this->moduleContentLegacy($row);
}
// Compile document
if (version_compare(TYPO3_version, '7.5.99', '>')) {
$this->addToolbarButtons();
$this->moduleTemplate->setContent($this->content);
$content = $this->moduleTemplate->renderContent();
} else {
$markers = array('FUNC_MENU' => '', 'CONTENT' => $this->content);
// Build the <body> for the module
$docHeaderButtons = $this->getButtons();
$content = $this->doc->startPage($this->languageService->getLL('title'));
$content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markers);
$content .= $this->doc->endPage();
// Wrap result appropriately
$content = $this->doc->insertStylesAndJS($content);
}
// Replace module content with everything needed
$this->content = $content;
}
示例5: printContent
/**
* Print accumulated content of module
*
* @return void
*/
public function printContent()
{
echo $this->moduleTemplate->renderContent();
}
示例6: render
/**
* Loads the template source and render the template.
* If "layoutName" is set in a PostParseFacet callback, it will render the file with the given layout.
*
* Additionally amends the rendered template with a module template "frame"
*
* @param string $actionName If set, the view of the specified action will be rendered instead. Default is the action specified in the Request object
* @return string Rendered Template
* @api
*/
public function render($actionName = null)
{
$actionViewContent = $this->templateView->render($actionName);
$this->moduleTemplate->setContent($actionViewContent);
return $this->moduleTemplate->renderContent();
}