SuggestWizardController
readonly class \
Receives ajax request from FormEngine suggest wizard and creates suggest answer as json result
Internal
This class is a specific Backend controller implementation and is not considered part of the Public TYPO3 API.
Attributes
- #[AsController]
Table of Contents
Methods
- __construct() : mixed
- searchAction() : ResponseInterface
- Ajax handler for the "suggest" feature in FormEngine.
- currentBackendUserMayAccessTable() : bool
- Checks if the current backend user is allowed to access the given table, based on the schema capabilities.
- getBackendUser() : BackendUserAuthentication
- getConfigurationForTable() : array
- Returns the configuration for the suggest wizard for the given table. This does multiple overlays from the TSconfig.
- getTablesToQueryFromFieldConfiguration() : array
- Checks the given field configuration for the tables that should be used for querying and returns them as an array.
- getWhereClause() : string
- Returns the SQL WHERE clause to use for querying records. This is currently only relevant if a foreign_table is configured and should be used; it could e.g. be used to limit to a certain subset of records from the foreign table
- substituteRawValues() : array
- Wraps user functions in the configuration array as a `RawValue` object, to be asserted later when actually calling `GeneralUtility::callUserFunction`.
Methods
__construct()
public
__construct(FlexFormTools $flexFormTools, TcaSchemaFactory $tcaSchemaFactory) : mixed
Parameters
- $flexFormTools : FlexFormTools
- $tcaSchemaFactory : TcaSchemaFactory
searchAction()
Ajax handler for the "suggest" feature in FormEngine.
public
searchAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Tags
Return values
ResponseInterfacecurrentBackendUserMayAccessTable()
Checks if the current backend user is allowed to access the given table, based on the schema capabilities.
protected
currentBackendUserMayAccessTable(TcaSchema $schema) : bool
Parameters
- $schema : TcaSchema
Return values
boolgetBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetConfigurationForTable()
Returns the configuration for the suggest wizard for the given table. This does multiple overlays from the TSconfig.
protected
getConfigurationForTable(string $queryTable, array $wizardConfig, array $TSconfig, string $table, string $field) : array
Parameters
- $queryTable : string
-
The table to query
- $wizardConfig : array
-
The configuration for the wizard as configured in the data structure
- $TSconfig : array
-
The TSconfig array of the current page
- $table : string
-
The table where the wizard is used
- $field : string
-
The field where the wizard is used
Return values
arraygetTablesToQueryFromFieldConfiguration()
Checks the given field configuration for the tables that should be used for querying and returns them as an array.
protected
getTablesToQueryFromFieldConfiguration(array $fieldConfig) : array
Parameters
- $fieldConfig : array
Return values
arraygetWhereClause()
Returns the SQL WHERE clause to use for querying records. This is currently only relevant if a foreign_table is configured and should be used; it could e.g. be used to limit to a certain subset of records from the foreign table
protected
getWhereClause(array $fieldConfig) : string
Parameters
- $fieldConfig : array
Return values
stringsubstituteRawValues()
Wraps user functions in the configuration array as a `RawValue` object, to be asserted later when actually calling `GeneralUtility::callUserFunction`.
protected
substituteRawValues(array $config) : array
Parameters
- $config : array