PHP Class FluidTYPO3\Flux\Provider\AbstractProvider

Inheritance: implements FluidTYPO3\Flux\Provider\ProviderInterface
Afficher le fichier Open project: fluidtypo3/flux Class Usage Examples

Protected Properties

Свойство Type Description
$configurationSectionName string | null
$configurationService FluidTYPO3\Flux\Service\FluxService
$contentObjectType string Fill with the "CType" value that should trigger this Provider.
$dataStructArray array
$extensionKey string | null
$fieldName string Fill with the table column name which should trigger this Provider.
$form FluidTYPO3\Flux\Form
$grid FluidTYPO3\Flux\Form\Container\Grid
$listType string Fill with the "list_type" value that should trigger this Provider.
$name string
$parentFieldName string
$priority integer
$recordService FluidTYPO3\Flux\Service\WorkspacesAwareRecordService
$row array | null
$tableName string Fill with the name of the DB table which should trigger this Provider.
$templatePathAndFilename string | null
$templatePaths array | null
$templateVariables array
$viewContext FluidTYPO3\Flux\View\ViewContext

Méthodes publiques

Méthode Description
clearCacheCommand ( array $command = [] ) : void Perform various cleanup operations upon clearing cache
getConfigurationSectionName ( array $row ) : string | null
getContentObjectType ( ) : string
getControllerActionFromRecord ( array $row ) : string Stub: Get the name of the controller action associated with $row
getControllerActionReferenceFromRecord ( array $row ) : string Stub: Get a compacted controller name + action name string
getControllerExtensionKeyFromRecord ( array $row ) : string Stub: Get the extension key of the controller associated with $row
getControllerNameFromRecord ( array $row ) : string Stub: override this to return a controller action name associated with $row.
getControllerPackageNameFromRecord ( array $row ) : string Stub: Get the package name of the controller associated with $row
getExtensionKey ( array $row ) : string | null
getFieldName ( array $row ) : string | null
getFlexFormValues ( array $row ) : array Converts the contents of the provided row's Flux-enabled field, at the same time running through the inheritance tree generated by getInheritanceTree() in order to apply inherited values.
getForm ( array $row ) : Form | null
getGrid ( array $row ) : FluidTYPO3\Flux\Form\Container\Grid
getListType ( ) : string
getName ( ) : string
getParentFieldName ( array $row ) : string
getPreview ( array $row ) : array Get preview chunks - header and content - as array(string $headerContent, string $previewContent, boolean $continueRendering)
getPriority ( array $row ) : integer
getTableName ( array $row ) : string | null
getTemplatePathAndFilename ( array $row ) : string | null
getTemplatePaths ( array $row ) : array
getTemplateVariables ( array $row ) : array | null
getViewContext ( array $row, TYPO3\CMS\Extbase\Mvc\RequestInterface $request = NULL ) : FluidTYPO3\Flux\View\ViewContext
injectConfigurationService ( FluxService $configurationService ) : void
injectRecordService ( FluidTYPO3\Flux\Service\WorkspacesAwareRecordService $recordService ) : void
loadSettings ( array $settings ) : void
postProcessCommand ( string $command, integer $id, array &$row, integer &$relativeTo, TYPO3\CMS\Core\DataHandling\DataHandler $reference ) : void Post-process a command executed on a record form the table this ConfigurationProvider is attached to.
postProcessDataStructure ( array &$row, mixed &$dataStructure, array $conf ) : void Post-process the TCEforms DataStructure for a record associated with this ConfigurationProvider
postProcessDatabaseOperation ( string $status, integer $id, array &$row, TYPO3\CMS\Core\DataHandling\DataHandler $reference ) : void Post-process database operation for the table that this ConfigurationProvider is attached to.
postProcessRecord ( string $operation, integer $id, array &$row, TYPO3\CMS\Core\DataHandling\DataHandler $reference, array $removals = [] ) : void Post-process record data for the table that this ConfigurationProvider is attached to.
preProcessCommand ( string $command, integer $id, array &$row, integer &$relativeTo, TYPO3\CMS\Core\DataHandling\DataHandler $reference ) : void Pre-process a command executed on a record form the table this ConfigurationProvider is attached to.
preProcessRecord ( array &$row, integer $id, TYPO3\CMS\Core\DataHandling\DataHandler $reference ) : void Pre-process record data for the table that this ConfigurationProvider is attached to.
processTableConfiguration ( array $row, array $configuration ) : array Processes the table configuration (TCA) for the table associated with this Provider, as determined by the trigger() method. Gets passed an instance of the record being edited/created along with the current configuration array - and must return a complete copy of the configuration array manipulated to the Provider's needs.
reset ( ) : void
setConfigurationSectionName ( string | null $configurationSectionName ) : void
setContentObjectType ( string $contentObjectType )
setExtensionKey ( string $extensionKey ) : void
setFieldName ( string $fieldName ) : void
setForm ( Form $form )
setGrid ( FluidTYPO3\Flux\Form\Container\Grid $grid )
setListType ( string $listType )
setName ( string $name )
setTableName ( string $tableName ) : void
setTemplatePathAndFilename ( string $templatePathAndFilename ) : void
setTemplatePaths ( array | null $templatePaths ) : void
setTemplateVariables ( array | null $templateVariables ) : void
setViewContext ( FluidTYPO3\Flux\View\ViewContext $viewContext ) : void
shouldCall ( string $methodName, mixed $id, string $command = '' ) : boolean Use by TceMain to track method calls to providers for a certain $id.
trackMethodCall ( string $methodName, mixed $id, $command = '' ) : void Use by TceMain to track method calls to providers for a certain $id.
trigger ( array $row, string $table, string $field, string $extensionKey = NULL ) : boolean

Méthodes protégées

Méthode Description
getCacheKeyForStoredVariable ( array $row, string $variable ) : string
getCurrentLanguageName ( ) : string | null Gets the current language name as string, in a format that is compatible with language pointers in a flexform. Usually this implies values like "en", "de" etc.
getCurrentValuePointerName ( ) : string | null Gets the pointer name to use whne retrieving values from a flexform source. Return NULL when pointer is default.
getPageValues ( ) : array Returns the page record with localisation applied, if any exists in database. Maintains uid and pid of the original page if localisation is applied.
getPreviewView ( ) : PreviewView
getViewVariables ( array $row ) : array
loadRecordFromDatabase ( integer $uid ) : array | null
resolveFormClassName ( array $row ) : string If not-NULL is returned, the value is used as object class name when creating a Form implementation instance which can be returned as form instead of reading from template or overriding the getForm() method.
shouldCallWithClassName ( string $className, string $methodName, mixed $id, string $command = '' ) : boolean Internal method. See shouldCall.
trackMethodCallWithClassName ( string $className, string $methodName, mixed $id, string $command = '' ) : void Internal method. See trackMethodCall.

Method Details

clearCacheCommand() public méthode

Perform various cleanup operations upon clearing cache
public clearCacheCommand ( array $command = [] ) : void
$command array
Résultat void

getCacheKeyForStoredVariable() protected méthode

protected getCacheKeyForStoredVariable ( array $row, string $variable ) : string
$row array
$variable string
Résultat string

getConfigurationSectionName() public méthode

public getConfigurationSectionName ( array $row ) : string | null
$row array
Résultat string | null

getContentObjectType() public méthode

public getContentObjectType ( ) : string
Résultat string

getControllerActionFromRecord() public méthode

Stub: Get the name of the controller action associated with $row
public getControllerActionFromRecord ( array $row ) : string
$row array
Résultat string

getControllerActionReferenceFromRecord() public méthode

Stub: Get a compacted controller name + action name string

getControllerExtensionKeyFromRecord() public méthode

Stub: Get the extension key of the controller associated with $row
public getControllerExtensionKeyFromRecord ( array $row ) : string
$row array
Résultat string

getControllerNameFromRecord() public méthode

Default strategy: return base name of Provider class minus the "Provider" suffix.
public getControllerNameFromRecord ( array $row ) : string
$row array
Résultat string

getControllerPackageNameFromRecord() public méthode

Stub: Get the package name of the controller associated with $row
public getControllerPackageNameFromRecord ( array $row ) : string
$row array
Résultat string

getCurrentLanguageName() protected méthode

Return NULL when language is site default language.
protected getCurrentLanguageName ( ) : string | null
Résultat string | null

getCurrentValuePointerName() protected méthode

Gets the pointer name to use whne retrieving values from a flexform source. Return NULL when pointer is default.
protected getCurrentValuePointerName ( ) : string | null
Résultat string | null

getExtensionKey() public méthode

public getExtensionKey ( array $row ) : string | null
$row array
Résultat string | null

getFieldName() public méthode

public getFieldName ( array $row ) : string | null
$row array The record row which triggered processing
Résultat string | null

getFlexFormValues() public méthode

Converts the contents of the provided row's Flux-enabled field, at the same time running through the inheritance tree generated by getInheritanceTree() in order to apply inherited values.
public getFlexFormValues ( array $row ) : array
$row array
Résultat array

getForm() public méthode

public getForm ( array $row ) : Form | null
$row array
Résultat FluidTYPO3\Flux\Form | null

getGrid() public méthode

public getGrid ( array $row ) : FluidTYPO3\Flux\Form\Container\Grid
$row array
Résultat FluidTYPO3\Flux\Form\Container\Grid

getListType() public méthode

public getListType ( ) : string
Résultat string

getName() public méthode

public getName ( ) : string
Résultat string

getPageValues() protected méthode

Returns the page record with localisation applied, if any exists in database. Maintains uid and pid of the original page if localisation is applied.
protected getPageValues ( ) : array
Résultat array

getParentFieldName() public méthode

public getParentFieldName ( array $row ) : string
$row array
Résultat string

getPreview() public méthode

Default implementation renders the Preview section from the template file that the actual Provider returns for $row, using paths also determined by $row. Example: fluidcontent's Provider returns files and paths based on selected "Fluid Content type" and inherits and uses this method to render a Preview from the template file in the specific path. This default implementation expects the TYPO3 core to render the default header, so it returns NULL as $headerContent.
public getPreview ( array $row ) : array
$row array The record data to be analysed for variables to use in a rendered preview
Résultat array

getPreviewView() protected méthode

protected getPreviewView ( ) : PreviewView
Résultat FluidTYPO3\Flux\View\PreviewView

getPriority() public méthode

public getPriority ( array $row ) : integer
$row array
Résultat integer

getTableName() public méthode

public getTableName ( array $row ) : string | null
$row array The record row which triggered processing
Résultat string | null

getTemplatePathAndFilename() public méthode

public getTemplatePathAndFilename ( array $row ) : string | null
$row array
Résultat string | null

getTemplatePaths() public méthode

public getTemplatePaths ( array $row ) : array
$row array
Résultat array

getTemplateVariables() public méthode

public getTemplateVariables ( array $row ) : array | null
$row array
Résultat array | null

getViewContext() public méthode

public getViewContext ( array $row, TYPO3\CMS\Extbase\Mvc\RequestInterface $request = NULL ) : FluidTYPO3\Flux\View\ViewContext
$row array
$request TYPO3\CMS\Extbase\Mvc\RequestInterface
Résultat FluidTYPO3\Flux\View\ViewContext

getViewVariables() protected méthode

protected getViewVariables ( array $row ) : array
$row array
Résultat array

injectConfigurationService() public méthode

public injectConfigurationService ( FluxService $configurationService ) : void
$configurationService FluidTYPO3\Flux\Service\FluxService
Résultat void

injectRecordService() public méthode

public injectRecordService ( FluidTYPO3\Flux\Service\WorkspacesAwareRecordService $recordService ) : void
$recordService FluidTYPO3\Flux\Service\WorkspacesAwareRecordService
Résultat void

loadRecordFromDatabase() protected méthode

protected loadRecordFromDatabase ( integer $uid ) : array | null
$uid integer
Résultat array | null

loadSettings() public méthode

public loadSettings ( array $settings ) : void
$settings array
Résultat void

postProcessCommand() public méthode

Post-process a command executed on a record form the table this ConfigurationProvider is attached to.
public postProcessCommand ( string $command, integer $id, array &$row, integer &$relativeTo, TYPO3\CMS\Core\DataHandling\DataHandler $reference ) : void
$command string
$id integer
$row array
$relativeTo integer
$reference TYPO3\CMS\Core\DataHandling\DataHandler
Résultat void

postProcessDataStructure() public méthode

Post-process the TCEforms DataStructure for a record associated with this ConfigurationProvider
public postProcessDataStructure ( array &$row, mixed &$dataStructure, array $conf ) : void
$row array
$dataStructure mixed
$conf array
Résultat void

postProcessDatabaseOperation() public méthode

Post-process database operation for the table that this ConfigurationProvider is attached to.
public postProcessDatabaseOperation ( string $status, integer $id, array &$row, TYPO3\CMS\Core\DataHandling\DataHandler $reference ) : void
$status string TYPO3 operation identifier, i.e. "new" etc.
$id integer The ID of the current record (which is sometimes now included in $row
$row array The record's data, by reference. Changing fields' values changes the record's values just before saving after operation
$reference TYPO3\CMS\Core\DataHandling\DataHandler A reference to the \TYPO3\CMS\Core\DataHandling\DataHandler object that is currently performing the database operation
Résultat void

postProcessRecord() public méthode

Post-process record data for the table that this ConfigurationProvider is attached to.
public postProcessRecord ( string $operation, integer $id, array &$row, TYPO3\CMS\Core\DataHandling\DataHandler $reference, array $removals = [] ) : void
$operation string TYPO3 operation identifier, i.e. "update", "new" etc.
$id integer The ID of the current record (which is sometimes now included in $row
$row array the record data, by reference. Changing fields' values changes the record's values just before saving
$reference TYPO3\CMS\Core\DataHandling\DataHandler A reference to the \TYPO3\CMS\Core\DataHandling\DataHandler object that is currently saving the record
$removals array Allows overridden methods to pass an additional array of field names to remove from the stored Flux value
Résultat void

preProcessCommand() public méthode

Pre-process a command executed on a record form the table this ConfigurationProvider is attached to.
public preProcessCommand ( string $command, integer $id, array &$row, integer &$relativeTo, TYPO3\CMS\Core\DataHandling\DataHandler $reference ) : void
$command string
$id integer
$row array
$relativeTo integer
$reference TYPO3\CMS\Core\DataHandling\DataHandler
Résultat void

preProcessRecord() public méthode

Pre-process record data for the table that this ConfigurationProvider is attached to.
public preProcessRecord ( array &$row, integer $id, TYPO3\CMS\Core\DataHandling\DataHandler $reference ) : void
$row array The record data, by reference. Changing fields' values changes the record's values before display
$id integer The ID of the current record (which is sometimes now included in $row
$reference TYPO3\CMS\Core\DataHandling\DataHandler A reference to the \TYPO3\CMS\Core\DataHandling\DataHandler object that is currently displaying the record
Résultat void

processTableConfiguration() public méthode

Processes the table configuration (TCA) for the table associated with this Provider, as determined by the trigger() method. Gets passed an instance of the record being edited/created along with the current configuration array - and must return a complete copy of the configuration array manipulated to the Provider's needs.
public processTableConfiguration ( array $row, array $configuration ) : array
$row array The record being edited/created
$configuration array
Résultat array The large FormEngine configuration array - see FormEngine documentation!

reset() public méthode

public reset ( ) : void
Résultat void

resolveFormClassName() protected méthode

If not-NULL is returned, the value is used as object class name when creating a Form implementation instance which can be returned as form instead of reading from template or overriding the getForm() method.
protected resolveFormClassName ( array $row ) : string
$row array
Résultat string

setConfigurationSectionName() public méthode

public setConfigurationSectionName ( string | null $configurationSectionName ) : void
$configurationSectionName string | null
Résultat void

setContentObjectType() public méthode

public setContentObjectType ( string $contentObjectType )
$contentObjectType string

setExtensionKey() public méthode

public setExtensionKey ( string $extensionKey ) : void
$extensionKey string
Résultat void

setFieldName() public méthode

public setFieldName ( string $fieldName ) : void
$fieldName string
Résultat void

setForm() public méthode

public setForm ( Form $form )
$form FluidTYPO3\Flux\Form

setGrid() public méthode

public setGrid ( FluidTYPO3\Flux\Form\Container\Grid $grid )
$grid FluidTYPO3\Flux\Form\Container\Grid

setListType() public méthode

public setListType ( string $listType )
$listType string

setName() public méthode

public setName ( string $name )
$name string

setTableName() public méthode

public setTableName ( string $tableName ) : void
$tableName string
Résultat void

setTemplatePathAndFilename() public méthode

public setTemplatePathAndFilename ( string $templatePathAndFilename ) : void
$templatePathAndFilename string
Résultat void

setTemplatePaths() public méthode

public setTemplatePaths ( array | null $templatePaths ) : void
$templatePaths array | null
Résultat void

setTemplateVariables() public méthode

public setTemplateVariables ( array | null $templateVariables ) : void
$templateVariables array | null
Résultat void

setViewContext() public méthode

public setViewContext ( FluidTYPO3\Flux\View\ViewContext $viewContext ) : void
$viewContext FluidTYPO3\Flux\View\ViewContext
Résultat void

shouldCall() public méthode

Every provider should only be called once per method / $id. Before calling a provider, TceMain will call this method. If the provider hasn't been called for that method / $id before, it is.
public shouldCall ( string $methodName, mixed $id, string $command = '' ) : boolean
$methodName string
$id mixed
$command string
Résultat boolean

shouldCallWithClassName() protected méthode

This is used by flux own provider to make sure on inheritance they are still only executed once.
protected shouldCallWithClassName ( string $className, string $methodName, mixed $id, string $command = '' ) : boolean
$className string
$methodName string
$id mixed
$command string
Résultat boolean

trackMethodCall() public méthode

Every provider should only be called once per method / $id / command. When TceMain has called the provider it will call this method afterwards.
public trackMethodCall ( string $methodName, mixed $id, $command = '' ) : void
$methodName string
$id mixed
Résultat void

trackMethodCallWithClassName() protected méthode

This is used by flux own provider to make sure on inheritance they are still only executed once.
protected trackMethodCallWithClassName ( string $className, string $methodName, mixed $id, string $command = '' ) : void
$className string
$methodName string
$id mixed
$command string
Résultat void

trigger() public méthode

public trigger ( array $row, string $table, string $field, string $extensionKey = NULL ) : boolean
$row array
$table string
$field string
$extensionKey string
Résultat boolean

Property Details

$configurationSectionName protected_oe property

protected string|NULL $configurationSectionName
Résultat string | null

$configurationService protected_oe property

protected FluxService,FluidTYPO3\Flux\Service $configurationService
Résultat FluidTYPO3\Flux\Service\FluxService

$contentObjectType protected_oe property

Fill with the "CType" value that should trigger this Provider.
protected string $contentObjectType
Résultat string

$dataStructArray protected_oe property

protected array $dataStructArray
Résultat array

$extensionKey protected_oe property

protected string|NULL $extensionKey
Résultat string | null

$fieldName protected_oe property

Fill with the table column name which should trigger this Provider.
protected string $fieldName
Résultat string

$form protected_oe property

protected Form,FluidTYPO3\Flux $form
Résultat FluidTYPO3\Flux\Form

$grid protected_oe property

protected Grid,FluidTYPO3\Flux\Form\Container $grid
Résultat FluidTYPO3\Flux\Form\Container\Grid

$listType protected_oe property

Fill with the "list_type" value that should trigger this Provider.
protected string $listType
Résultat string

$name protected_oe property

protected string $name
Résultat string

$parentFieldName protected_oe property

protected string $parentFieldName
Résultat string

$priority protected_oe property

protected int $priority
Résultat integer

$recordService protected_oe property

protected WorkspacesAwareRecordService,FluidTYPO3\Flux\Service $recordService
Résultat FluidTYPO3\Flux\Service\WorkspacesAwareRecordService

$row protected_oe property

protected array|NULL $row
Résultat array | null

$tableName protected_oe property

Fill with the name of the DB table which should trigger this Provider.
protected string $tableName
Résultat string

$templatePathAndFilename protected_oe property

protected string|NULL $templatePathAndFilename
Résultat string | null

$templatePaths protected_oe property

protected array|NULL $templatePaths
Résultat array | null

$templateVariables protected_oe property

protected array $templateVariables
Résultat array

$viewContext protected_oe property

protected ViewContext,FluidTYPO3\Flux\View $viewContext
Résultat FluidTYPO3\Flux\View\ViewContext