SuggestWizardController

readonly class \TYPO3\CMS\Backend\Controller\Wizard\SuggestWizardController

Receives ajax request from FormEngine suggest wizard and creates suggest answer as json result

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

searchAction()

Ajax handler for the "suggest" feature in FormEngine.

public searchAction(ServerRequestInterface $request) : ResponseInterface

Parameters

$request : ServerRequestInterface

Tags

throws
RuntimeException

for incomplete or invalid arguments

Return values

ResponseInterface

currentBackendUserMayAccessTable()

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

bool

getConfigurationForTable()

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

array

getTablesToQueryFromFieldConfiguration()

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

array

getWhereClause()

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

string

substituteRawValues()

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

Return values

array
On this page