PHP Класс FluidTYPO3\Flux\Provider\AbstractProvider

Наследование: implements FluidTYPO3\Flux\Provider\ProviderInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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.

Описание методов

clearCacheCommand() публичный метод

Perform various cleanup operations upon clearing cache
public clearCacheCommand ( array $command = [] ) : void
$command array
Результат void

getCacheKeyForStoredVariable() защищенный метод

protected getCacheKeyForStoredVariable ( array $row, string $variable ) : string
$row array
$variable string
Результат string

getConfigurationSectionName() публичный метод

public getConfigurationSectionName ( array $row ) : string | null
$row array
Результат string | null

getContentObjectType() публичный метод

public getContentObjectType ( ) : string
Результат string

getControllerActionFromRecord() публичный метод

Stub: Get the name of the controller action associated with $row
public getControllerActionFromRecord ( array $row ) : string
$row array
Результат string

getControllerActionReferenceFromRecord() публичный метод

Stub: Get a compacted controller name + action name string
public getControllerActionReferenceFromRecord ( array $row ) : string
$row array
Результат string

getControllerExtensionKeyFromRecord() публичный метод

Stub: Get the extension key of the controller associated with $row
public getControllerExtensionKeyFromRecord ( array $row ) : string
$row array
Результат string

getControllerNameFromRecord() публичный метод

Default strategy: return base name of Provider class minus the "Provider" suffix.
public getControllerNameFromRecord ( array $row ) : string
$row array
Результат string

getControllerPackageNameFromRecord() публичный метод

Stub: Get the package name of the controller associated with $row
public getControllerPackageNameFromRecord ( array $row ) : string
$row array
Результат string

getCurrentLanguageName() защищенный метод

Return NULL when language is site default language.
protected getCurrentLanguageName ( ) : string | null
Результат string | null

getCurrentValuePointerName() защищенный метод

Gets the pointer name to use whne retrieving values from a flexform source. Return NULL when pointer is default.
protected getCurrentValuePointerName ( ) : string | null
Результат string | null

getExtensionKey() публичный метод

public getExtensionKey ( array $row ) : string | null
$row array
Результат string | null

getFieldName() публичный метод

public getFieldName ( array $row ) : string | null
$row array The record row which triggered processing
Результат string | null

getFlexFormValues() публичный метод

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
Результат array

getForm() публичный метод

public getForm ( array $row ) : Form | null
$row array
Результат FluidTYPO3\Flux\Form | null

getGrid() публичный метод

public getGrid ( array $row ) : FluidTYPO3\Flux\Form\Container\Grid
$row array
Результат FluidTYPO3\Flux\Form\Container\Grid

getListType() публичный метод

public getListType ( ) : string
Результат string

getName() публичный метод

public getName ( ) : string
Результат string

getPageValues() защищенный метод

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
Результат array

getParentFieldName() публичный метод

public getParentFieldName ( array $row ) : string
$row array
Результат string

getPreview() публичный метод

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
Результат array

getPreviewView() защищенный метод

protected getPreviewView ( ) : PreviewView
Результат FluidTYPO3\Flux\View\PreviewView

getPriority() публичный метод

public getPriority ( array $row ) : integer
$row array
Результат integer

getTableName() публичный метод

public getTableName ( array $row ) : string | null
$row array The record row which triggered processing
Результат string | null

getTemplatePathAndFilename() публичный метод

public getTemplatePathAndFilename ( array $row ) : string | null
$row array
Результат string | null

getTemplatePaths() публичный метод

public getTemplatePaths ( array $row ) : array
$row array
Результат array

getTemplateVariables() публичный метод

public getTemplateVariables ( array $row ) : array | null
$row array
Результат array | null

getViewContext() публичный метод

public getViewContext ( array $row, TYPO3\CMS\Extbase\Mvc\RequestInterface $request = NULL ) : FluidTYPO3\Flux\View\ViewContext
$row array
$request TYPO3\CMS\Extbase\Mvc\RequestInterface
Результат FluidTYPO3\Flux\View\ViewContext

getViewVariables() защищенный метод

protected getViewVariables ( array $row ) : array
$row array
Результат array

injectConfigurationService() публичный метод

public injectConfigurationService ( FluxService $configurationService ) : void
$configurationService FluidTYPO3\Flux\Service\FluxService
Результат void

injectRecordService() публичный метод

public injectRecordService ( FluidTYPO3\Flux\Service\WorkspacesAwareRecordService $recordService ) : void
$recordService FluidTYPO3\Flux\Service\WorkspacesAwareRecordService
Результат void

loadRecordFromDatabase() защищенный метод

protected loadRecordFromDatabase ( integer $uid ) : array | null
$uid integer
Результат array | null

loadSettings() публичный метод

public loadSettings ( array $settings ) : void
$settings array
Результат void

postProcessCommand() публичный метод

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
Результат void

postProcessDataStructure() публичный метод

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
Результат void

postProcessDatabaseOperation() публичный метод

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
Результат void

postProcessRecord() публичный метод

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
Результат void

preProcessCommand() публичный метод

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
Результат void

preProcessRecord() публичный метод

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
Результат void

processTableConfiguration() публичный метод

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
Результат array The large FormEngine configuration array - see FormEngine documentation!

reset() публичный метод

public reset ( ) : void
Результат void

resolveFormClassName() защищенный метод

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
Результат string

setConfigurationSectionName() публичный метод

public setConfigurationSectionName ( string | null $configurationSectionName ) : void
$configurationSectionName string | null
Результат void

setContentObjectType() публичный метод

public setContentObjectType ( string $contentObjectType )
$contentObjectType string

setExtensionKey() публичный метод

public setExtensionKey ( string $extensionKey ) : void
$extensionKey string
Результат void

setFieldName() публичный метод

public setFieldName ( string $fieldName ) : void
$fieldName string
Результат void

setForm() публичный метод

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

setGrid() публичный метод

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

setListType() публичный метод

public setListType ( string $listType )
$listType string

setName() публичный метод

public setName ( string $name )
$name string

setTableName() публичный метод

public setTableName ( string $tableName ) : void
$tableName string
Результат void

setTemplatePathAndFilename() публичный метод

public setTemplatePathAndFilename ( string $templatePathAndFilename ) : void
$templatePathAndFilename string
Результат void

setTemplatePaths() публичный метод

public setTemplatePaths ( array | null $templatePaths ) : void
$templatePaths array | null
Результат void

setTemplateVariables() публичный метод

public setTemplateVariables ( array | null $templateVariables ) : void
$templateVariables array | null
Результат void

setViewContext() публичный метод

public setViewContext ( FluidTYPO3\Flux\View\ViewContext $viewContext ) : void
$viewContext FluidTYPO3\Flux\View\ViewContext
Результат void

shouldCall() публичный метод

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
Результат boolean

shouldCallWithClassName() защищенный метод

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
Результат boolean

trackMethodCall() публичный метод

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
Результат void

trackMethodCallWithClassName() защищенный метод

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
Результат void

trigger() публичный метод

public trigger ( array $row, string $table, string $field, string $extensionKey = NULL ) : boolean
$row array
$table string
$field string
$extensionKey string
Результат boolean

Описание свойств

$configurationSectionName защищенное свойство

protected string|NULL $configurationSectionName
Результат string | null

$configurationService защищенное свойство

protected FluxService,FluidTYPO3\Flux\Service $configurationService
Результат FluidTYPO3\Flux\Service\FluxService

$contentObjectType защищенное свойство

Fill with the "CType" value that should trigger this Provider.
protected string $contentObjectType
Результат string

$dataStructArray защищенное свойство

protected array $dataStructArray
Результат array

$extensionKey защищенное свойство

protected string|NULL $extensionKey
Результат string | null

$fieldName защищенное свойство

Fill with the table column name which should trigger this Provider.
protected string $fieldName
Результат string

$form защищенное свойство

protected Form,FluidTYPO3\Flux $form
Результат FluidTYPO3\Flux\Form

$grid защищенное свойство

protected Grid,FluidTYPO3\Flux\Form\Container $grid
Результат FluidTYPO3\Flux\Form\Container\Grid

$listType защищенное свойство

Fill with the "list_type" value that should trigger this Provider.
protected string $listType
Результат string

$name защищенное свойство

protected string $name
Результат string

$parentFieldName защищенное свойство

protected string $parentFieldName
Результат string

$priority защищенное свойство

protected int $priority
Результат integer

$recordService защищенное свойство

protected WorkspacesAwareRecordService,FluidTYPO3\Flux\Service $recordService
Результат FluidTYPO3\Flux\Service\WorkspacesAwareRecordService

$row защищенное свойство

protected array|NULL $row
Результат array | null

$tableName защищенное свойство

Fill with the name of the DB table which should trigger this Provider.
protected string $tableName
Результат string

$templatePathAndFilename защищенное свойство

protected string|NULL $templatePathAndFilename
Результат string | null

$templatePaths защищенное свойство

protected array|NULL $templatePaths
Результат array | null

$templateVariables защищенное свойство

protected array $templateVariables
Результат array

$viewContext защищенное свойство

protected ViewContext,FluidTYPO3\Flux\View $viewContext
Результат FluidTYPO3\Flux\View\ViewContext