TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Backend\Form\Wizard\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()

TYPO3\CMS\Backend\Form\Wizard\SuggestWizard::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 365 of file SuggestWizard.php.

Referenced by TYPO3\CMS\Backend\Form\Wizard\SuggestWizard\searchAction().

◆ currentBackendUserMayAccessTable()

TYPO3\CMS\Backend\Form\Wizard\SuggestWizard::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 TYPO3\CMS\Backend\Form\Wizard\SuggestWizard\getTablesToQueryFromFieldConfiguration().

◆ getConfigurationForTable()

TYPO3\CMS\Backend\Form\Wizard\SuggestWizard::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 324 of file SuggestWizard.php.

References TYPO3\CMS\Core\Utility\ArrayUtility\mergeRecursiveWithOverrule().

Referenced by TYPO3\CMS\Backend\Form\Wizard\SuggestWizard\searchAction().

◆ getLanguageService()

TYPO3\CMS\Backend\Form\Wizard\SuggestWizard::getLanguageService ( )
protected
Returns
LanguageService

Definition at line 440 of file SuggestWizard.php.

References $GLOBALS.

◆ getNestedDsFieldConfig()

TYPO3\CMS\Backend\Form\Wizard\SuggestWizard::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.

Referenced by TYPO3\CMS\Backend\Form\Wizard\SuggestWizard\overrideFieldNameAndConfigurationForFlexform().

◆ getTablesToQueryFromFieldConfiguration()

TYPO3\CMS\Backend\Form\Wizard\SuggestWizard::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 394 of file SuggestWizard.php.

References $GLOBALS, TYPO3\CMS\Backend\Form\Wizard\SuggestWizard\currentBackendUserMayAccessTable(), TYPO3\CMS\Backend\Form\Wizard\SuggestWizard\isTableHidden(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Backend\Form\Wizard\SuggestWizard\searchAction().

◆ getWhereClause()

TYPO3\CMS\Backend\Form\Wizard\SuggestWizard::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 427 of file SuggestWizard.php.

Referenced by TYPO3\CMS\Backend\Form\Wizard\SuggestWizard\searchAction().

◆ isTableHidden()

TYPO3\CMS\Backend\Form\Wizard\SuggestWizard::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 TYPO3\CMS\Backend\Form\Wizard\SuggestWizard\getTablesToQueryFromFieldConfiguration().

◆ overrideFieldNameAndConfigurationForFlexform()

TYPO3\CMS\Backend\Form\Wizard\SuggestWizard::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, TYPO3\CMS\Backend\Utility\BackendUtility\getFlexFormDS(), TYPO3\CMS\Backend\Form\Wizard\SuggestWizard\getNestedDsFieldConfig(), TYPO3\CMS\Core\Utility\GeneralUtility\resolveAllSheetsInDS(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Backend\Form\Wizard\SuggestWizard\searchAction().

◆ searchAction()