Skip to content
Snippets Groups Projects

[FEATURE] add new optional FluidRenderer

Merged Philipp Nowinski requested to merge feature_fluidRenderer into master
3 unresolved threads
Files
2
+ 0
76
@@ -25,89 +25,13 @@ namespace SGalinski\DfTabs\View;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use SGalinski\DfTabs\Domain\Model\Tab;
use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Core\Page\PageRenderer;
use TYPO3\CMS\Core\SingletonInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
/**
* Renders the content
*/
class FluidView implements SingletonInterface {
/**
* @var array
*/
protected $pluginConfiguration = [];
/**
* Page Renderer Instance
*
* @var PageRenderer
*/
protected $pageRenderer;
/**
* @var ContentObjectRenderer
*/
protected $contentObject;
/**
* Internal plugin counter
*
* @var int
*/
protected $counter = 1;
/**
* Internal container that holds the used hashes
*
* @var array
*/
protected $usedHashes = [];
/**
* Injects the plugin configuration
*
* @param array $configuration
* @param string $tabId
* @return void
*/
public function injectPluginConfiguration(array $configuration, $tabId) {
$this->pluginConfiguration[$tabId] = $configuration;
$this->pluginConfiguration[$tabId]['counter'] = $this->counter;
if (\in_array($this->pluginConfiguration[$tabId]['hashName'], $this->usedHashes)) {
$this->pluginConfiguration[$tabId]['hashName'] = 'tab' . $this->counter . '-';
}
$this->usedHashes[] = $this->pluginConfiguration[$tabId]['hashName'];
++$this->counter;
}
/**
* Injects the page renderer
*
* @param PageRenderer $pageRenderer
* @return void
*/
public function injectPageRenderer($pageRenderer) {
$this->pageRenderer = $pageRenderer;
}
/**
* Injects the content object
*
* @param ContentObjectRenderer $contentObject
* @return void
*/
public function injectContentObject($contentObject) {
$this->contentObject = $contentObject;
}
/**
* Renders the tabs
Loading