PHP Class FluidTYPO3\Fluidcontent\Service\ConfigurationService

Provides methods to read various configuration related to Fluid Content Elements.
Author: Claus Due
Inheritance: extends FluidTYPO3\Flux\Service\FluxService, implements TYPO3\CMS\Core\SingletonInterface
显示文件 Open project: fluidtypo3/fluidcontent Class Usage Examples

Protected Properties

Property Type Description
$defaultIcon string
$extConf array
$manager TYPO3\CMS\Core\Cache\CacheManager
$pageRepository TYPO3\CMS\Frontend\Page\PageRepository
$pageUidBackup integer Storage for the current page UID to restore after this Service abuses ConfigurationManager to override the page UID used when resolving configurations for all TypoScript templates defined in the site.
$recordService FluidTYPO3\Flux\Service\WorkspacesAwareRecordService

Public Methods

Method Description
__construct ( ) Constructor
getContentConfiguration ( string $extensionName = NULL ) : array Get definitions of paths for FCEs defined in TypoScript
getContentElementFormInstances ( ) : Form[][]
getContentTypeSelectorItems ( ) : array
getDefaultIcon ( ) : string
getPageTsConfig ( ) : string
injectCacheManager ( TYPO3\CMS\Core\Cache\CacheManager $manager ) : void
injectPageRepository ( TYPO3\CMS\Frontend\Page\PageRepository $pageRepository ) : void
injectRecordService ( FluidTYPO3\Flux\Service\WorkspacesAwareRecordService $recordService ) : void
writeCachedConfigurationIfMissing ( ) : void

Protected Methods

Method Description
backupPageUidForConfigurationManager ( ) : void
buildAllWizardTabGroups ( array $allTemplatePaths ) : array Scans all folders in $allTemplatePaths for template files, reads information about each file and collects the groups of files into groups of pageTSconfig setup.
buildAllWizardTabsPageTsConfig ( array $wizardTabs ) : string Builds a big piece of pageTSconfig setup, defining every detected content element's wizard tabs and items.
buildWizardTabItem ( string $tabId, string $id, Form $form, string $templateFileIdentity ) : string Builds a single Wizard item (one FCE) based on the tab id, element id, configuration array and special template identity (groupName:Relative/Path/File.html)
getAllRootTypoScriptTemplates ( ) : array
getTypoScriptTemplatesInRootline ( ) : array
isBackendMode ( ) : boolean
overrideCurrentPageUidForConfigurationManager ( integer $newPageUid ) : void
renderPageTypoScriptForPageUid ( $pageUid ) : string
restorePageUidForConfigurationManager ( ) : void
sanitizeString ( string $string ) : string
sendDisabledContentWarning ( string $templatePathAndFilename ) : void

Method Details

__construct() public method

Constructor
public __construct ( )

backupPageUidForConfigurationManager() protected method

buildAllWizardTabGroups() protected method

Scans all folders in $allTemplatePaths for template files, reads information about each file and collects the groups of files into groups of pageTSconfig setup.
protected buildAllWizardTabGroups ( array $allTemplatePaths ) : array
$allTemplatePaths array
return array

buildAllWizardTabsPageTsConfig() protected method

Builds a big piece of pageTSconfig setup, defining every detected content element's wizard tabs and items.
protected buildAllWizardTabsPageTsConfig ( array $wizardTabs ) : string
$wizardTabs array
return string

buildWizardTabItem() protected method

Builds a single Wizard item (one FCE) based on the tab id, element id, configuration array and special template identity (groupName:Relative/Path/File.html)
protected buildWizardTabItem ( string $tabId, string $id, Form $form, string $templateFileIdentity ) : string
$tabId string
$id string
$form FluidTYPO3\Flux\Form
$templateFileIdentity string
return string

getAllRootTypoScriptTemplates() protected method

protected getAllRootTypoScriptTemplates ( ) : array
return array

getContentConfiguration() public method

Get definitions of paths for FCEs defined in TypoScript
public getContentConfiguration ( string $extensionName = NULL ) : array
$extensionName string
return array

getContentElementFormInstances() public method

public getContentElementFormInstances ( ) : Form[][]
return FluidTYPO3\Flux\Form[][]

getContentTypeSelectorItems() public method

getDefaultIcon() public method

public getDefaultIcon ( ) : string
return string

getPageTsConfig() public method

public getPageTsConfig ( ) : string
return string

getTypoScriptTemplatesInRootline() protected method

injectCacheManager() public method

public injectCacheManager ( TYPO3\CMS\Core\Cache\CacheManager $manager ) : void
$manager TYPO3\CMS\Core\Cache\CacheManager
return void

injectPageRepository() public method

public injectPageRepository ( TYPO3\CMS\Frontend\Page\PageRepository $pageRepository ) : void
$pageRepository TYPO3\CMS\Frontend\Page\PageRepository
return void

injectRecordService() public method

public injectRecordService ( FluidTYPO3\Flux\Service\WorkspacesAwareRecordService $recordService ) : void
$recordService FluidTYPO3\Flux\Service\WorkspacesAwareRecordService
return void

isBackendMode() protected method

protected isBackendMode ( ) : boolean
return boolean

overrideCurrentPageUidForConfigurationManager() protected method

protected overrideCurrentPageUidForConfigurationManager ( integer $newPageUid ) : void
$newPageUid integer
return void

renderPageTypoScriptForPageUid() protected method

protected renderPageTypoScriptForPageUid ( $pageUid ) : string
$pageUid
return string

restorePageUidForConfigurationManager() protected method

sanitizeString() protected method

protected sanitizeString ( string $string ) : string
$string string
return string

sendDisabledContentWarning() protected method

protected sendDisabledContentWarning ( string $templatePathAndFilename ) : void
$templatePathAndFilename string
return void

writeCachedConfigurationIfMissing() public method

Property Details

$defaultIcon protected_oe property

protected string $defaultIcon
return string

$extConf protected_oe property

protected array $extConf
return array

$manager protected_oe property

protected CacheManager,TYPO3\CMS\Core\Cache $manager
return TYPO3\CMS\Core\Cache\CacheManager

$pageRepository protected_oe property

protected PageRepository,TYPO3\CMS\Frontend\Page $pageRepository
return TYPO3\CMS\Frontend\Page\PageRepository

$pageUidBackup protected_oe property

Storage for the current page UID to restore after this Service abuses ConfigurationManager to override the page UID used when resolving configurations for all TypoScript templates defined in the site.
protected int $pageUidBackup
return integer

$recordService protected_oe property

protected WorkspacesAwareRecordService,FluidTYPO3\Flux\Service $recordService
return FluidTYPO3\Flux\Service\WorkspacesAwareRecordService