Skip to content
Snippets Groups Projects

[FEATURE] add new optional FluidRenderer

Merged Philipp Nowinski requested to merge feature_fluidRenderer into master
3 unresolved threads
1 file
+ 1
0
Compare changes
  • Side-by-side
  • Inline
+ 53
0
<?php
Please register or sign in to reply
namespace SGalinski\DfTabs\View;
/***************************************************************
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.de)
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use TYPO3\CMS\Core\SingletonInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* Renders the content
*/
class FluidView implements SingletonInterface {
/**
* Renders the tabs
*
* @param array $tabElements
* @param string $tabId
* @return string
*/
public function renderTabs($tabElements, $tabId) {
$fluidView = GeneralUtility::makeInstance(\TYPO3\CMS\Fluid\View\StandaloneView::class);
$fluidView->setTemplateRootPaths([
GeneralUtility::getFileAbsFileName('EXT:df_tabs/Resources/Private/Templates')
]);
$fluidView->setTemplate('Tabs.html');
$fluidView->assign('tabElements', $tabElements);
return $fluidView->render();
}
}
Loading