TYPO3  7.6
Public Member Functions | Protected Member Functions | List of all members
SuggestWizard Class Reference

Public Member Functions

 searchAction (ServerRequestInterface $request, ResponseInterface $response)
 

Protected Member Functions

 getNestedDsFieldConfig (array $dataStructure, $fieldName)
 
 isTableHidden (array $tableConfig)
 
 currentBackendUserMayAccessTable (array $tableConfig)
 
 overrideFieldNameAndConfigurationForFlexform ($table, &$field, array $row, &$fieldConfig)
 
 getConfigurationForTable ($queryTable, array $wizardConfig, array $TSconfig, $table, $field)
 
 createListItemsFromResultRow (array $resultRows, $maxItems)
 
 getTablesToQueryFromFieldConfiguration (array $fieldConfig)
 
 getWhereClause (array $fieldConfig)
 
 getLanguageService ()
 

Detailed Description

Wizard for rendering an AJAX selector for records

Definition at line 30 of file SuggestWizard.php.

Member Function Documentation

createListItemsFromResultRow ( array  $resultRows,
  $maxItems 
)
protected

Creates a list of elements from a list of results returned by the receiver.

Parameters
array$resultRows
int$maxItems
string$rowIdSuffix
Returns
array

Definition at line 361 of file SuggestWizard.php.

Referenced by SuggestWizard\searchAction().

currentBackendUserMayAccessTable ( array  $tableConfig)
protected

Checks if the current backend user is allowed to access the given table, based on the ctrl-section of the table's configuration array (TCA) entry.

Parameters
array$tableConfig
Returns
bool

Definition at line 249 of file SuggestWizard.php.

References $GLOBALS.

Referenced by SuggestWizard\getTablesToQueryFromFieldConfiguration().

getConfigurationForTable (   $queryTable,
array  $wizardConfig,
array  $TSconfig,
  $table,
  $field 
)
protected

Returns the configuration for the suggest wizard for the given table. This does multiple overlays from the TSconfig.

Parameters
string$queryTableThe table to query
array$wizardConfigThe configuration for the wizard as configured in the data structure
array$TSconfigThe TSconfig array of the current page
string$tableThe table where the wizard is used
string$fieldThe field where the wizard is used
Returns
array

Definition at line 320 of file SuggestWizard.php.

References ArrayUtility\mergeRecursiveWithOverrule().

Referenced by SuggestWizard\searchAction().

getLanguageService ( )
protected
Returns
LanguageService

Definition at line 436 of file SuggestWizard.php.

References $GLOBALS.

getNestedDsFieldConfig ( array  $dataStructure,
  $fieldName 
)
protected

Search a data structure array recursively – including within nested (repeating) elements – for a particular field config.

Parameters
array$dataStructureThe data structure
string$fieldNameThe field name
Returns
array

Definition at line 109 of file SuggestWizard.php.

References elseif.

Referenced by SuggestWizard\overrideFieldNameAndConfigurationForFlexform().

getTablesToQueryFromFieldConfiguration ( array  $fieldConfig)
protected

Checks the given field configuration for the tables that should be used for querying and returns them as an array.

Parameters
array$fieldConfig
Returns
array

Definition at line 390 of file SuggestWizard.php.

References $GLOBALS, SuggestWizard\currentBackendUserMayAccessTable(), elseif, SuggestWizard\isTableHidden(), and GeneralUtility\trimExplode().

Referenced by SuggestWizard\searchAction().

getWhereClause ( array  $fieldConfig)
protected

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

Parameters
array$fieldConfig
Returns
string

Definition at line 423 of file SuggestWizard.php.

Referenced by SuggestWizard\searchAction().

isTableHidden ( array  $tableConfig)
protected

Returns TRUE if a table has been marked as hidden in the configuration

Parameters
array$tableConfig
Returns
bool

Definition at line 237 of file SuggestWizard.php.

Referenced by SuggestWizard\getTablesToQueryFromFieldConfiguration().

overrideFieldNameAndConfigurationForFlexform (   $table,
$field,
array  $row,
$fieldConfig 
)
protected

Checks if the query comes from a Flexform element and if yes, resolves the field configuration from the Flexform data structure.

Parameters
string$table
string&$fieldThe field identifier, either a simple table field or a Flexform field path separated with |
array$rowThe row we're dealing with; optional (only required for Flexform records)
array | NULL&$fieldConfig

Definition at line 273 of file SuggestWizard.php.

References $GLOBALS, BackendUtility\getFlexFormDS(), SuggestWizard\getNestedDsFieldConfig(), and GeneralUtility\resolveAllSheetsInDS().

Referenced by SuggestWizard\searchAction().

searchAction ( ServerRequestInterface  $request,
ResponseInterface  $response 
)