PHP Class FluidTYPO3\Flux\Service\FluxService

Main API Service for interacting with Flux-based FlexForms
Inheritance: implements TYPO3\CMS\Core\SingletonInterface
Mostra file Open project: fluidtypo3/flux Class Usage Examples

Protected Properties

Property Type Description
$cache array
$configurationManager TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
$contentObjectData array
$friendlySeverities array
$objectManager TYPO3\CMS\Extbase\Object\ObjectManagerInterface
$providerResolver FluidTYPO3\Flux\Provider\ProviderResolver
$raw string
$reflectionService TYPO3\CMS\Extbase\Reflection\ReflectionService
$sentDebugMessages array
$typoScript array

Public Methods

Method Description
convertFlexFormContentToArray ( string $flexFormContent, Form $form = NULL, string $languagePointer = 'lDEF', string $valuePointer = 'vDEF' ) : array Parses the flexForm content and converts it to an array The resulting array will be multi-dimensional, as a value "bla.blubb" results in two levels, and a value "bla.blubb.bla" results in three levels.
debug ( mixed $instance, boolean $plainText = TRUE, integer $depth = 2 ) : void
flushCache ( ) : void
getAllTypoScript ( ) : array Returns the complete, global TypoScript array defined in TYPO3.
getBackendViewConfigurationForExtensionName ( string $extensionName ) : array | null Returns the module.tx_extsignature.view array.
getFormFromTemplateFile ( FluidTYPO3\Flux\View\ViewContext $viewContext, string $formName = 'form' ) : Form | null
getGridFromTemplateFile ( FluidTYPO3\Flux\View\ViewContext $viewContext, string $gridName = 'grid' ) : FluidTYPO3\Flux\Form\Container\Grid | null Reads a Grid constructed using flux:grid, returning an array of defined rows and columns along with any content areas.
getPreparedExposedTemplateView ( FluidTYPO3\Flux\View\ViewContext $viewContext ) : ExposedTemplateView
getResolver ( ) : FluidTYPO3\Flux\Helper\Resolver
getSettingsForExtensionName ( string $extensionName ) : array Returns the plugin.tx_extsignature.settings array.
getTypoScriptByPath ( string $path ) : array Gets the value/array from global TypoScript by dotted path expression.
getViewConfigurationForExtensionName ( string $extensionName ) : array | null Returns the plugin.tx_extsignature.view array, or a default set of paths if that array is not defined in TypoScript.
injectConfigurationManager ( TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager ) : void
injectObjectManager ( TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager ) : void
injectProviderResolver ( FluidTYPO3\Flux\Provider\ProviderResolver $providerResolver ) : void
injectReflectionService ( TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService ) : void
message ( string $message, integer $severity = GeneralUtility::SYSLOG_SEVERITY_INFO, string $title = 'Flux Debug' ) : void
resolveConfigurationProviders ( string $table, string $fieldName, array $row = NULL, string $extensionKey = NULL ) : FluidTYPO3\Flux\Provider\ProviderInterface[] Resolves a ConfigurationProvider which can provide a working FlexForm configuration based on the given parameters.
resolvePrimaryConfigurationProvider ( string $table, string $fieldName, array $row = NULL, string $extensionKey = NULL ) : FluidTYPO3\Flux\Provider\ProviderInterface | null ResolveUtility the top-priority ConfigurationPrivider which can provide a working FlexForm configuration baed on the given parameters.
sortObjectsByProperty ( array $objects, string $sortBy, string $sortDirection = 'ASC' ) : array

Protected Methods

Method Description
getDefaultViewConfigurationForExtensionKey ( string $extensionKey ) : array Gets an array with the default view configuration for the provided extension key. Maybe overwritten by a sub-service class adding additional subfolders used by default.
logMessage ( string $message, integer $severity ) : void

Method Details

convertFlexFormContentToArray() public method

Note: multi-language flexForms are not supported yet
public convertFlexFormContentToArray ( string $flexFormContent, Form $form = NULL, string $languagePointer = 'lDEF', string $valuePointer = 'vDEF' ) : array
$flexFormContent string flexForm xml string
$form FluidTYPO3\Flux\Form An instance of \FluidTYPO3\Flux\Form. If transformation instructions are contained in this configuration they are applied after conversion to array
$languagePointer string language pointer used in the flexForm
$valuePointer string value pointer used in the flexForm
return array the processed array

debug() public method

public debug ( mixed $instance, boolean $plainText = TRUE, integer $depth = 2 ) : void
$instance mixed
$plainText boolean
$depth integer
return void

flushCache() public method

public flushCache ( ) : void
return void

getAllTypoScript() public method

Returns the complete, global TypoScript array defined in TYPO3.
public getAllTypoScript ( ) : array
return array

getBackendViewConfigurationForExtensionName() public method

Accepts any input extension name type.
public getBackendViewConfigurationForExtensionName ( string $extensionName ) : array | null
$extensionName string
return array | null

getDefaultViewConfigurationForExtensionKey() protected method

(e.g. EXT:fluidpages can provide "Resources/Private/Templates/Page" as default templateRootPath)
protected getDefaultViewConfigurationForExtensionKey ( string $extensionKey ) : array
$extensionKey string
return array

getFormFromTemplateFile() public method

public getFormFromTemplateFile ( FluidTYPO3\Flux\View\ViewContext $viewContext, string $formName = 'form' ) : Form | null
$viewContext FluidTYPO3\Flux\View\ViewContext
$formName string
return FluidTYPO3\Flux\Form | null

getGridFromTemplateFile() public method

Note about specific implementations: * EXT:fluidpages uses the Grid to render a BackendLayout on TYPO3 6.0 and above * EXT:flux uses the Grid to render content areas inside content elements registered with Flux But your custom extension is of course allowed to use the Grid for any purpose. You can even read the Grid from - for example - the currently selected page template to know exactly how the BackendLayout looks.
public getGridFromTemplateFile ( FluidTYPO3\Flux\View\ViewContext $viewContext, string $gridName = 'grid' ) : FluidTYPO3\Flux\Form\Container\Grid | null
$viewContext FluidTYPO3\Flux\View\ViewContext
$gridName string
return FluidTYPO3\Flux\Form\Container\Grid | null

getPreparedExposedTemplateView() public method

public getPreparedExposedTemplateView ( FluidTYPO3\Flux\View\ViewContext $viewContext ) : ExposedTemplateView
$viewContext FluidTYPO3\Flux\View\ViewContext
return FluidTYPO3\Flux\View\ExposedTemplateView

getResolver() public method

public getResolver ( ) : FluidTYPO3\Flux\Helper\Resolver
return FluidTYPO3\Flux\Helper\Resolver

getSettingsForExtensionName() public method

Accepts any input extension name type.
public getSettingsForExtensionName ( string $extensionName ) : array
$extensionName string
return array

getTypoScriptByPath() public method

Gets the value/array from global TypoScript by dotted path expression.
public getTypoScriptByPath ( string $path ) : array
$path string
return array

getViewConfigurationForExtensionName() public method

Returns the plugin.tx_extsignature.view array, or a default set of paths if that array is not defined in TypoScript.
public getViewConfigurationForExtensionName ( string $extensionName ) : array | null
$extensionName string
return array | null

injectConfigurationManager() public method

public injectConfigurationManager ( TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager ) : void
$configurationManager TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
return void

injectObjectManager() public method

public injectObjectManager ( TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager ) : void
$objectManager TYPO3\CMS\Extbase\Object\ObjectManagerInterface
return void

injectProviderResolver() public method

public injectProviderResolver ( FluidTYPO3\Flux\Provider\ProviderResolver $providerResolver ) : void
$providerResolver FluidTYPO3\Flux\Provider\ProviderResolver
return void

injectReflectionService() public method

public injectReflectionService ( TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService ) : void
$reflectionService TYPO3\CMS\Extbase\Reflection\ReflectionService
return void

logMessage() protected method

protected logMessage ( string $message, integer $severity ) : void
$message string
$severity integer
return void

message() public method

public message ( string $message, integer $severity = GeneralUtility::SYSLOG_SEVERITY_INFO, string $title = 'Flux Debug' ) : void
$message string
$severity integer
$title string
return void

resolveConfigurationProviders() public method

Resolves a ConfigurationProvider which can provide a working FlexForm configuration based on the given parameters.
public resolveConfigurationProviders ( string $table, string $fieldName, array $row = NULL, string $extensionKey = NULL ) : FluidTYPO3\Flux\Provider\ProviderInterface[]
$table string
$fieldName string
$row array
$extensionKey string
return FluidTYPO3\Flux\Provider\ProviderInterface[]

resolvePrimaryConfigurationProvider() public method

ResolveUtility the top-priority ConfigurationPrivider which can provide a working FlexForm configuration baed on the given parameters.
public resolvePrimaryConfigurationProvider ( string $table, string $fieldName, array $row = NULL, string $extensionKey = NULL ) : FluidTYPO3\Flux\Provider\ProviderInterface | null
$table string
$fieldName string
$row array
$extensionKey string
return FluidTYPO3\Flux\Provider\ProviderInterface | null

sortObjectsByProperty() public method

public sortObjectsByProperty ( array $objects, string $sortBy, string $sortDirection = 'ASC' ) : array
$objects array
$sortBy string
$sortDirection string
return array

Property Details

$cache protected_oe static_oe property

protected static array $cache
return array

$configurationManager protected_oe property

protected ConfigurationManagerInterface,TYPO3\CMS\Extbase\Configuration $configurationManager
return TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface

$contentObjectData protected_oe property

protected array $contentObjectData
return array

$friendlySeverities protected_oe static_oe property

protected static array $friendlySeverities
return array

$objectManager protected_oe property

protected ObjectManagerInterface,TYPO3\CMS\Extbase\Object $objectManager
return TYPO3\CMS\Extbase\Object\ObjectManagerInterface

$providerResolver protected_oe property

protected ProviderResolver,FluidTYPO3\Flux\Provider $providerResolver
return FluidTYPO3\Flux\Provider\ProviderResolver

$raw protected_oe property

protected string $raw
return string

$reflectionService protected_oe property

protected ReflectionService,TYPO3\CMS\Extbase\Reflection $reflectionService
return TYPO3\CMS\Extbase\Reflection\ReflectionService

$sentDebugMessages protected_oe property

protected array $sentDebugMessages
return array

$typoScript protected_oe static_oe property

protected static array $typoScript
return array