QuerySearchController

class \TYPO3\CMS\Lowlevel\Controller\QuerySearchController

"Database > Advanced query" module.

Attributes

#[AsController]

Table of Contents

Properties

$comp_offsets  : array
$compSQL  : array
$connectionPool  : ConnectionPool
$enablePrefix  : bool
$enableQueryParts  : bool
$extFieldLists  : array
$fieldList  : string
$fieldName  : string
$fields  : array
$flashMessageService  : FlashMessageService
$formName  : string
$lang  : array
$locales  : Locales
$MOD_MENU  : array
The module menu items array.
$MOD_SETTINGS  : array
Current settings for the keys of the MOD_MENU array.
$moduleName  : string
$moduleTemplateFactory  : ModuleTemplateFactory
$name  : string
$noDownloadB  : int
$pageDescendantsRepository  : PageDescendantsRepository
$queryConfig  : array
$responseFactory  : ResponseFactoryInterface
$showFieldAndTableNames  : bool
If the current user is an admin and $GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] is set to true, the names of fields and tables are displayed.
$storeList  : string
$table  : string
$tableArray  : array
$tcaSchemaFactory  : TcaSchemaFactory
$uriBuilder  : UriBuilder

Methods

__construct()  : mixed
handleRequest()  : ResponseInterface
addToStoreQueryConfigs()  : array
cleanInputVal()  : mixed
cleanStoreQueryConfigs()  : array
cleanUpQueryConfig()  : array
convertIso8601DatetimeStringToUnixTimestamp()  : array
csvValues()  : string
getBackendUserAuthentication()  : BackendUserAuthentication
getComparisonOptions()  : array
getDateTimePickerData()  : array
getFieldOptions()  : array
getFormElements()  : array
getLabelCol()  : string
getLanguageService()  : LanguageService
getProcessedValueExtra()  : string
getQuery()  : string
getQueryResultData()  : array
getQuerySingle()  : string
getResultRowData()  : array
getResultRowTitles()  : array
getSelectFieldsForRecordTitle()  : string[]
Returns the fields of the table, which are needed to resolve the record title
getSelectQuery()  : string
getSubscript()  : array
getTableOptions()  : array
getTreeList()  : string
Recursively fetch all descendants of a given page
getValueOptions()  : array
init()  : void
initStoreArray()  : array
isDateOfIso8601Format()  : bool
Checks if the given value is of the ISO 8601 format.
loadStoreQueryConfigs()  : array
makeFieldList()  : string
makeSelectorTable()  : array
makeValueList()  : string
menuConfig()  : void
Configure menu
procesData()  : void
procesStoreControl()  : FlashMessage|null
queryMaker()  : array
setAndCleanUpExternalLists()  : void
updateModuleData()  : array
Applies the changed settings defined in MOD_MENU to the module data, ensures that menu settings hold an allowed value and persists the module data on change.
verifyComparison()  : int
verifyType()  : string

Properties

$comp_offsets

protected array $comp_offsets = ['text' => 0, 'number' => 1, 'multiple' => 2, 'relation' => …
Show the full value['text' => 0, 'number' => 1, 'multiple' => 2, 'relation' => 2, 'date' => 3, 'time' => 3, 'boolean' => 4, 'binary' => 5]

$compSQL

protected array $compSQL = [ // Type = text offset = 0 '0' => '#FIELD# LIKE \'%…
Show the full value[ // Type = text offset = 0 '0' => '#FIELD# LIKE \'%#VALUE#%\'', '1' => '#FIELD# NOT LIKE \'%#VALUE#%\'', '2' => '#FIELD# LIKE \'#VALUE#%\'', '3' => '#FIELD# NOT LIKE \'#VALUE#%\'', '4' => '#FIELD# LIKE \'%#VALUE#\'', '5' => '#FIELD# NOT LIKE \'%#VALUE#\'', '6' => '#FIELD# = \'#VALUE#\'', '7' => '#FIELD# != \'#VALUE#\'', // Type = number, offset = 32 '32' => '#FIELD# = \'#VALUE#\'', '33' => '#FIELD# != \'#VALUE#\'', '34' => '#FIELD# > #VALUE#', '35' => '#FIELD# < #VALUE#', '36' => '#FIELD# >= #VALUE# AND #FIELD# <= #VALUE1#', '37' => 'NOT (#FIELD# >= #VALUE# AND #FIELD# <= #VALUE1#)', '38' => '#FIELD# IN (#VALUE#)', '39' => '#FIELD# NOT IN (#VALUE#)', '40' => '(#FIELD# & #VALUE#)=#VALUE#', '41' => '(#FIELD# & #VALUE#)!=#VALUE#', '42' => '(#FIELD# | #VALUE#)=#VALUE#', '43' => '(#FIELD# | #VALUE#)!=#VALUE#', // Type = multiple, relation, offset = 64 '64' => '#FIELD# = \'#VALUE#\'', '65' => '#FIELD# != \'#VALUE#\'', '66' => '#FIELD# LIKE \'%#VALUE#%\' AND #FIELD# LIKE \'%#VALUE1#%\'', '67' => '(#FIELD# NOT LIKE \'%#VALUE#%\' OR #FIELD# NOT LIKE \'%#VALUE1#%\')', '68' => '#FIELD# IN (#VALUE#)', '69' => '#FIELD# NOT IN (#VALUE#)', '70' => '(#FIELD# & #VALUE#)=#VALUE#', '71' => '(#FIELD# & #VALUE#)!=#VALUE#', '72' => '(#FIELD# | #VALUE#)=#VALUE#', '73' => '(#FIELD# | #VALUE#)!=#VALUE#', // Type = date, offset = 32 '96' => '#FIELD# = \'#VALUE#\'', '97' => '#FIELD# != \'#VALUE#\'', '98' => '#FIELD# > #VALUE#', '99' => '#FIELD# < #VALUE#', '100' => '#FIELD# >= #VALUE# AND #FIELD# <= #VALUE1#', '101' => 'NOT (#FIELD# >= #VALUE# AND #FIELD# <= #VALUE1#)', '102' => '(#FIELD# & #VALUE#)=#VALUE#', '103' => '(#FIELD# & #VALUE#)!=#VALUE#', '104' => '(#FIELD# | #VALUE#)=#VALUE#', '105' => '(#FIELD# | #VALUE#)!=#VALUE#', // Type = boolean, offset = 128 '128' => '#FIELD# = \'1\'', '129' => '#FIELD# != \'1\'', // Type = binary = 160 '160' => '#FIELD# = \'#VALUE#\'', '161' => '#FIELD# != \'#VALUE#\'', '162' => '(#FIELD# & #VALUE#)=#VALUE#', '163' => '(#FIELD# & #VALUE#)=0', ]

$enablePrefix

protected bool $enablePrefix = false

$enableQueryParts

protected bool $enableQueryParts = false

$extFieldLists

protected array $extFieldLists = []

$fieldName

protected string $fieldName = ''

$lang

protected array $lang = ['OR' => 'or', 'AND' => 'and', 'comparison' => [ // Type…
Show the full value['OR' => 'or', 'AND' => 'and', 'comparison' => [ // Type = text offset = 0 '0_' => 'contains', '1_' => 'does not contain', '2_' => 'starts with', '3_' => 'does not start with', '4_' => 'ends with', '5_' => 'does not end with', '6_' => 'equals', '7_' => 'does not equal', // Type = number , offset = 32 '32_' => 'equals', '33_' => 'does not equal', '34_' => 'is greater than', '35_' => 'is less than', '36_' => 'is between', '37_' => 'is not between', '38_' => 'is in list', '39_' => 'is not in list', '40_' => 'binary AND equals', '41_' => 'binary AND does not equal', '42_' => 'binary OR equals', '43_' => 'binary OR does not equal', // Type = multiple, relation, offset = 64 '64_' => 'equals', '65_' => 'does not equal', '66_' => 'contains', '67_' => 'does not contain', '68_' => 'is in list', '69_' => 'is not in list', '70_' => 'binary AND equals', '71_' => 'binary AND does not equal', '72_' => 'binary OR equals', '73_' => 'binary OR does not equal', // Type = date,time offset = 96 '96_' => 'equals', '97_' => 'does not equal', '98_' => 'is greater than', '99_' => 'is less than', '100_' => 'is between', '101_' => 'is not between', '102_' => 'binary AND equals', '103_' => 'binary AND does not equal', '104_' => 'binary OR equals', '105_' => 'binary OR does not equal', // Type = boolean, offset = 128 '128_' => 'is True', '129_' => 'is False', // Type = binary , offset = 160 '160_' => 'equals', '161_' => 'does not equal', '162_' => 'contains', '163_' => 'does not contain', ]]

$MOD_MENU

The module menu items array.

protected array $MOD_MENU = []

$MOD_SETTINGS

Current settings for the keys of the MOD_MENU array.

protected array $MOD_SETTINGS = []

$moduleName

protected string $moduleName = 'system_database_query'

$noDownloadB

protected int $noDownloadB = 0

$queryConfig

protected array $queryConfig = []

$responseFactory read-only

protected ResponseFactoryInterface $responseFactory

$showFieldAndTableNames

If the current user is an admin and $GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] is set to true, the names of fields and tables are displayed.

protected bool $showFieldAndTableNames = false

$storeList

protected string $storeList = 'search_query_smallparts,search_result_labels,labels_noprefi…
Show the full value'search_query_smallparts,search_result_labels,labels_noprefix,show_deleted,queryConfig,queryTable,queryFields,queryLimit,queryOrder,queryOrderDesc,queryOrder2,queryOrder2Desc,queryGroup,search_query_makeQuery'

$tableArray

protected array $tableArray = []

Methods

__construct()

public __construct(UriBuilder $uriBuilder, ModuleTemplateFactory $moduleTemplateFactory, TcaSchemaFactory $tcaSchemaFactory, Locales $locales, FlashMessageService $flashMessageService, ConnectionPool $connectionPool, ResponseFactoryInterface $responseFactory, PageDescendantsRepository $pageDescendantsRepository) : mixed

Parameters

$uriBuilder : UriBuilder
$moduleTemplateFactory : ModuleTemplateFactory
$tcaSchemaFactory : TcaSchemaFactory
$locales : Locales
$flashMessageService : FlashMessageService
$connectionPool : ConnectionPool
$responseFactory : ResponseFactoryInterface
$pageDescendantsRepository : PageDescendantsRepository

handleRequest()

public handleRequest(ServerRequestInterface $request) : ResponseInterface

Parameters

$request : ServerRequestInterface

Return values

ResponseInterface

addToStoreQueryConfigs()

protected addToStoreQueryConfigs(array $storeQueryConfigs, int $index) : array

Parameters

$storeQueryConfigs : array
$index : int

Return values

array

cleanInputVal()

protected cleanInputVal(array $conf[, string $suffix = '' ]) : mixed

Parameters

$conf : array
$suffix : string = ''

cleanStoreQueryConfigs()

protected cleanStoreQueryConfigs(array $storeQueryConfigs, array $storeArray) : array

Parameters

$storeQueryConfigs : array
$storeArray : array

Return values

array

cleanUpQueryConfig()

protected cleanUpQueryConfig(array $queryConfig) : array

Parameters

$queryConfig : array

Return values

array

convertIso8601DatetimeStringToUnixTimestamp()

protected convertIso8601DatetimeStringToUnixTimestamp(array $conf) : array

Parameters

$conf : array

Return values

array

csvValues()

protected csvValues(array $row[, string $table = '' ]) : string

Parameters

$row : array
$table : string = ''

Return values

string

getComparisonOptions()

protected getComparisonOptions(int $comparison, int $negate) : array

Parameters

$comparison : int
$negate : int

Return values

array

getDateTimePickerData()

protected getDateTimePickerData(string $name, string $timestamp, string $type) : array

Parameters

$name : string
$timestamp : string
$type : string

Return values

array

getFieldOptions()

protected getFieldOptions() : array

Return values

array

getFormElements()

protected getFormElements([int $subLevel = 0 ][, string|array|null $queryConfig = null ][, string $parent = '' ]) : array

Parameters

$subLevel : int = 0
$queryConfig : string|array|null = null
$parent : string = ''

Return values

array

getLabelCol()

protected getLabelCol() : string

Return values

string

getProcessedValueExtra()

protected getProcessedValueExtra(string $table, string $fieldName, string $fieldValue, string $splitString) : string

Parameters

$table : string
$fieldName : string
$fieldValue : string
$splitString : string

Return values

string

getQuery()

protected getQuery(array $queryConfig[, string $pad = '' ]) : string

Parameters

$queryConfig : array
$pad : string = ''

Return values

string

getQueryResultData()

protected getQueryResultData(string $type, array $dataRows, string $table, ServerRequestInterface $request) : array

Parameters

$type : string
$dataRows : array
$table : string
$request : ServerRequestInterface

Tags

throws
Exception

Return values

array —

Query result data

getQuerySingle()

protected getQuerySingle(array $conf, bool $first) : string

Parameters

$conf : array
$first : bool

Return values

string

getResultRowData()

protected getResultRowData(array $row, string $table, ServerRequestInterface $request) : array

Parameters

$row : array
$table : string
$request : ServerRequestInterface

Return values

array

getResultRowTitles()

protected getResultRowTitles(array $row, string $table) : array

Parameters

$row : array

Table columns

$table : string

Return values

array

getSelectFieldsForRecordTitle()

Returns the fields of the table, which are needed to resolve the record title

protected getSelectFieldsForRecordTitle(string $table) : string[]

Parameters

$table : string

Return values

string[]

getSelectQuery()

protected getSelectQuery([string $qString = '' ]) : string

Parameters

$qString : string = ''

Return values

string

getSubscript()

protected getSubscript(mixed $arr) : array

Parameters

$arr : mixed

Return values

array

getTableOptions()

protected getTableOptions() : array

Return values

array

getTreeList()

Recursively fetch all descendants of a given page

protected getTreeList(int $id, int $depth[, int $begin = 0 ][, string $permsClause = '' ]) : string

Parameters

$id : int
$depth : int
$begin : int = 0
$permsClause : string = ''

Return values

string —

comma separated list of descendant pages

getValueOptions()

protected getValueOptions(string $fieldName, array $conf, string $table) : array

Parameters

$fieldName : string
$conf : array
$table : string

Return values

array

init()

protected init(string $name, string $table[, string $fieldList = '' ][, array $settings = [] ]) : void

Parameters

$name : string
$table : string
$fieldList : string = ''
$settings : array = []

Module settings like checkboxes in the interface

initStoreArray()

protected initStoreArray() : array

Return values

array

isDateOfIso8601Format()

Checks if the given value is of the ISO 8601 format.

protected isDateOfIso8601Format(mixed $date) : bool

Parameters

$date : mixed

Return values

bool

loadStoreQueryConfigs()

protected loadStoreQueryConfigs(array $storeQueryConfigs, int $storeIndex, array $writeArray) : array

Parameters

$storeQueryConfigs : array
$storeIndex : int
$writeArray : array

Return values

array

makeFieldList()

protected makeFieldList() : string

Return values

string

makeSelectorTable()

protected makeSelectorTable(array $modSettings, ServerRequestInterface $request) : array

Parameters

$modSettings : array
$request : ServerRequestInterface

Return values

array

makeValueList()

protected makeValueList(string $fieldName, string $fieldValue, array $conf, string $table, string $splitString) : string

Parameters

$fieldName : string
$fieldValue : string
$conf : array
$table : string
$splitString : string

Return values

string

menuConfig()

Configure menu

protected menuConfig(ServerRequestInterface $request) : void

Parameters

$request : ServerRequestInterface

procesData()

protected procesData(ServerRequestInterface $request[, array $qC = [] ]) : void

Parameters

$request : ServerRequestInterface
$qC : array = []

procesStoreControl()

protected procesStoreControl(ServerRequestInterface $request) : FlashMessage|null

Parameters

$request : ServerRequestInterface

Return values

FlashMessage|null

queryMaker()

protected queryMaker(ServerRequestInterface $request) : array

Parameters

$request : ServerRequestInterface

Return values

array

setAndCleanUpExternalLists()

protected setAndCleanUpExternalLists(string $name, string $list[, string $force = '' ]) : void

Parameters

$name : string
$list : string
$force : string = ''

updateModuleData()

Applies the changed settings defined in MOD_MENU to the module data, ensures that menu settings hold an allowed value and persists the module data on change.

protected updateModuleData(ModuleData $moduleData, array $changedSettings) : array

Parameters

$moduleData : ModuleData
$changedSettings : array

Return values

array

verifyComparison()

protected verifyComparison(int $comparison, bool $neg) : int

Parameters

$comparison : int
$neg : bool

Return values

int

verifyType()

protected verifyType(string $fieldName) : string

Parameters

$fieldName : string

Return values

string
On this page