DatabaseIntegrityController
"DB Check" module.
This class is a specific Backend controller implementation and is not part of the TYPO3's Core API.
Table of Contents
Properties
- $comp_offsets : array<string|int, mixed>
- $compSQL : array<string|int, mixed>
- $enablePrefix : bool
- $enableQueryParts : bool
- $extFieldLists : array<string|int, mixed>
- $fieldList : string
- $fieldName : string
- $fields : array<string|int, mixed>
- $formName : string
- $hookArray : array<string|int, mixed>
- $iconFactory : IconFactory
- $lang : array<string|int, mixed>
- $MOD_MENU : array<string|int, mixed>
- The module menu items array.
- $MOD_SETTINGS : array<string|int, mixed>
- Current settings for the keys of the MOD_MENU array.
- $moduleName : string
- $moduleTemplateFactory : ModuleTemplateFactory
- $name : string
- $noDownloadB : int
- $queryConfig : array<string|int, mixed>
- $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<string|int, mixed>
- $uriBuilder : UriBuilder
Methods
- __construct() : mixed
- handleRequest() : ResponseInterface
- addToStoreQueryConfigs() : array<string|int, mixed>
- buildScriptUrl() : string
- Builds the URL to the current script with given arguments
- cleanInputVal() : mixed
- cleanStoreQueryConfigs() : array<string|int, mixed>
- cleanUpQueryConfig() : array<string|int, mixed>
- convertIso8601DatetimeStringToUnixTimestamp() : array<string|int, mixed>
- csvValues() : string
- form() : string
- getBackendUserAuthentication() : BackendUserAuthentication
- getDateTimePickerField() : string
- getDropdownMenu() : string
- Returns a selector box to switch the view Based on BackendUtility::getFuncMenu() but done as new function because it has another purpose.
- getFormElements() : array<string|int, mixed>
- getFuncCheck() : string
- Checkbox function menu.
- getLabelCol() : string
- getLanguageService() : LanguageService
- getProcessedValueExtra() : string
- getQuery() : string
- getQueryResultCode() : array<string|int, mixed>
- getQuerySingle() : string
- getSelectQuery() : string
- getSubscript() : array<string|int, mixed>
- getTreeList() : string
- Recursively fetch all descendants of a given page
- init() : void
- initStoreArray() : array<string|int, mixed>
- isDateOfIso8601Format() : bool
- Checks if the given value is of the ISO 8601 format.
- loadStoreQueryConfigs() : array<string|int, mixed>
- makeComparisonSelector() : string
- makeFieldList() : string
- makeOptionList() : string
- makeSelectorTable() : string
- makeStoreControl() : string
- makeValueList() : string
- menuConfig() : void
- Configure menu
- mkCompSelect() : string
- mkFieldToInputSelect() : string
- mkOperatorSelect() : string
- mkTableSelect() : string
- mkTypeSelect() : string
- printCodeArray() : string
- procesData() : void
- procesStoreControl() : string
- queryMaker() : string
- recordStatisticsAction() : ResponseInterface
- Records overview
- referenceIndexAction() : ResponseInterface
- Check and update reference index.
- relationsAction() : ResponseInterface
- Show reference list
- resultRowDisplay() : string
- resultRowTitles() : string
- search() : string
- searchAction() : ResponseInterface
- Search (Full / Advanced)
- setAndCleanUpExternalLists() : void
- setFormName() : void
- setUpDocHeader() : void
- Generate doc header drop-down and shortcut button.
- updateIcon() : string
- verifyComparison() : int
- verifyType() : string
Properties
$comp_offsets
protected
array<string|int, mixed>
$comp_offsets
= ['text' => 0, 'number' => 1, 'multiple' => 2, 'relation' => 2, 'date' => 3, 'time' => 3, 'boolean' => 4, 'binary' => 5]
$compSQL
protected
array<string|int, mixed>
$compSQL
= [
// 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<string|int, mixed>
$extFieldLists
= []
$fieldList
protected
string
$fieldList
$fieldName
protected
string
$fieldName
= ''
$fields
protected
array<string|int, mixed>
$fields
= []
$formName
protected
string
$formName
= ''
$hookArray
protected
array<string|int, mixed>
$hookArray
= []
$iconFactory
protected
IconFactory
$iconFactory
$lang
protected
array<string|int, mixed>
$lang
= ['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<string|int, mixed>
$MOD_MENU
= []
$MOD_SETTINGS
Current settings for the keys of the MOD_MENU array.
protected
array<string|int, mixed>
$MOD_SETTINGS
= []
$moduleName
protected
string
$moduleName
= ''
$moduleTemplateFactory read-only
protected
ModuleTemplateFactory
$moduleTemplateFactory
$name
protected
string
$name
= ''
$noDownloadB
protected
int
$noDownloadB
= 0
$queryConfig
protected
array<string|int, mixed>
$queryConfig
= []
$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_noprefix,show_deleted,queryConfig,queryTable,queryFields,queryLimit,queryOrder,queryOrderDesc,queryOrder2,queryOrder2Desc,queryGroup,search_query_makeQuery'
$table
protected
string
$table
= ''
$tableArray
protected
array<string|int, mixed>
$tableArray
= []
$uriBuilder read-only
protected
UriBuilder
$uriBuilder
Methods
__construct()
public
__construct(IconFactory $iconFactory, UriBuilder $uriBuilder, ModuleTemplateFactory $moduleTemplateFactory) : mixed
Parameters
- $iconFactory : IconFactory
- $uriBuilder : UriBuilder
- $moduleTemplateFactory : ModuleTemplateFactory
handleRequest()
public
handleRequest(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfaceaddToStoreQueryConfigs()
protected
addToStoreQueryConfigs(array<string|int, mixed> $storeQueryConfigs, int $index) : array<string|int, mixed>
Parameters
- $storeQueryConfigs : array<string|int, mixed>
- $index : int
Return values
array<string|int, mixed>buildScriptUrl()
Builds the URL to the current script with given arguments
protected
static buildScriptUrl(mixed $mainParams, string $addParams, ServerRequestInterface $request[, string $script = '' ]) : string
Parameters
- $mainParams : mixed
-
$id is the "&id=" parameter value to be sent to the module, but it can be also a parameter array which will be passed instead of the &id=...
- $addParams : string
-
Additional parameters to pass to the script.
- $request : ServerRequestInterface
- $script : string = ''
-
The script to send the &id to, if empty it's automatically found
Tags
Return values
string —The complete script URL
cleanInputVal()
protected
cleanInputVal(array<string|int, mixed> $conf[, string $suffix = '' ]) : mixed
Parameters
- $conf : array<string|int, mixed>
- $suffix : string = ''
cleanStoreQueryConfigs()
protected
cleanStoreQueryConfigs(array<string|int, mixed> $storeQueryConfigs, array<string|int, mixed> $storeArray) : array<string|int, mixed>
Parameters
- $storeQueryConfigs : array<string|int, mixed>
- $storeArray : array<string|int, mixed>
Return values
array<string|int, mixed>cleanUpQueryConfig()
protected
cleanUpQueryConfig(array<string|int, mixed> $queryConfig) : array<string|int, mixed>
Parameters
- $queryConfig : array<string|int, mixed>
Return values
array<string|int, mixed>convertIso8601DatetimeStringToUnixTimestamp()
protected
convertIso8601DatetimeStringToUnixTimestamp(array<string|int, mixed> $conf) : array<string|int, mixed>
Parameters
- $conf : array<string|int, mixed>
Return values
array<string|int, mixed>csvValues()
protected
csvValues(array<string|int, mixed> $row[, string $delim = ',' ][, string $quote = '"' ][, array<string|int, mixed> $conf = [] ][, string $table = '' ]) : string
Parameters
- $row : array<string|int, mixed>
- $delim : string = ','
- $quote : string = '"'
- $conf : array<string|int, mixed> = []
- $table : string = ''
Return values
stringform()
protected
form() : string
Return values
stringgetBackendUserAuthentication()
protected
getBackendUserAuthentication() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetDateTimePickerField()
protected
getDateTimePickerField(string $name, string $timestamp, string $type) : string
Parameters
- $name : string
- $timestamp : string
- $type : string
Return values
stringgetDropdownMenu()
Returns a selector box to switch the view Based on BackendUtility::getFuncMenu() but done as new function because it has another purpose.
protected
static getDropdownMenu(mixed $mainParams, string $elementName, string|int $currentValue, array<string|int, mixed> $menuItems, ServerRequestInterface $request[, string $script = '' ][, string $addParams = '' ][, array<string|int, mixed> $additionalAttributes = [] ]) : string
Mingling with getFuncMenu would harm the docHeader Menu.
Parameters
- $mainParams : mixed
-
The "&id=" parameter value to be sent to the module, but it can be also a parameter array which will be passed instead of the &id=...
- $elementName : string
-
The form elements name, probably something like "SET[...]
- $currentValue : string|int
-
The value to be selected currently.
- $menuItems : array<string|int, mixed>
-
An array with the menu items for the selector box
- $request : ServerRequestInterface
- $script : string = ''
-
The script to send the &id to, if empty it's automatically found
- $addParams : string = ''
-
Additional parameters to pass to the script.
- $additionalAttributes : array<string|int, mixed> = []
-
Additional attributes for the select element
Return values
string —HTML code for selector box
getFormElements()
protected
getFormElements([int $subLevel = 0 ][, string $queryConfig = '' ][, string $parent = '' ]) : array<string|int, mixed>
Parameters
- $subLevel : int = 0
- $queryConfig : string = ''
- $parent : string = ''
Return values
array<string|int, mixed>getFuncCheck()
Checkbox function menu.
protected
static getFuncCheck(mixed $mainParams, string $elementName, string|bool $currentValue, ServerRequestInterface $request[, string $script = '' ][, string $addParams = '' ][, string $tagParams = '' ]) : string
Works like ->getFuncMenu() but takes no $menuItem array since this is a simple checkbox.
Parameters
- $mainParams : mixed
-
$id is the "&id=" parameter value to be sent to the module, but it can be also a parameter array which will be passed instead of the &id=...
- $elementName : string
-
The form elements name, probably something like "SET[...]
- $currentValue : string|bool
-
The value to be selected currently.
- $request : ServerRequestInterface
- $script : string = ''
-
The script to send the &id to, if empty it's automatically found
- $addParams : string = ''
-
Additional parameters to pass to the script.
- $tagParams : string = ''
-
Additional attributes for the checkbox input tag
Tags
Return values
string —HTML code for checkbox
getLabelCol()
protected
getLabelCol() : string
Return values
stringgetLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServicegetProcessedValueExtra()
protected
getProcessedValueExtra(string $table, string $fieldName, string $fieldValue, array<string|int, mixed> $conf, string $splitString) : string
Parameters
- $table : string
- $fieldName : string
- $fieldValue : string
- $conf : array<string|int, mixed>
- $splitString : string
Return values
stringgetQuery()
protected
getQuery(array<string|int, mixed> $queryConfig[, string $pad = '' ]) : string
Parameters
- $queryConfig : array<string|int, mixed>
- $pad : string = ''
Return values
stringgetQueryResultCode()
protected
getQueryResultCode(string $type, array<string|int, mixed> $dataRows, string $table, ServerRequestInterface $request) : array<string|int, mixed>
Parameters
- $type : string
- $dataRows : array<string|int, mixed>
- $table : string
- $request : ServerRequestInterface
Tags
Return values
array<string|int, mixed> —HTML-code for "header" and "content"
getQuerySingle()
protected
getQuerySingle(array<string|int, mixed> $conf, bool $first) : string
Parameters
- $conf : array<string|int, mixed>
- $first : bool
Return values
stringgetSelectQuery()
protected
getSelectQuery([string $qString = '' ]) : string
Parameters
- $qString : string = ''
Return values
stringgetSubscript()
protected
getSubscript(mixed $arr) : array<string|int, mixed>
Parameters
- $arr : mixed
Return values
array<string|int, mixed>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
init()
protected
init(string $name, string $table[, string $fieldList = '' ][, array<string|int, mixed> $settings = [] ]) : void
Parameters
- $name : string
- $table : string
- $fieldList : string = ''
- $settings : array<string|int, mixed> = []
-
Module settings like checkboxes in the interface
initStoreArray()
protected
initStoreArray() : array<string|int, mixed>
Return values
array<string|int, mixed>isDateOfIso8601Format()
Checks if the given value is of the ISO 8601 format.
protected
isDateOfIso8601Format(mixed $date) : bool
Parameters
- $date : mixed
Return values
boolloadStoreQueryConfigs()
protected
loadStoreQueryConfigs(array<string|int, mixed> $storeQueryConfigs, int $storeIndex, array<string|int, mixed> $writeArray) : array<string|int, mixed>
Parameters
- $storeQueryConfigs : array<string|int, mixed>
- $storeIndex : int
- $writeArray : array<string|int, mixed>
Return values
array<string|int, mixed>makeComparisonSelector()
protected
makeComparisonSelector(string $subscript, string $fieldName, array<string|int, mixed> $conf) : string
Parameters
- $subscript : string
- $fieldName : string
- $conf : array<string|int, mixed>
Return values
stringmakeFieldList()
protected
makeFieldList() : string
Return values
stringmakeOptionList()
protected
makeOptionList(string $fieldName, array<string|int, mixed> $conf, string $table) : string
Parameters
- $fieldName : string
- $conf : array<string|int, mixed>
- $table : string
Return values
stringmakeSelectorTable()
protected
makeSelectorTable(array<string|int, mixed> $modSettings, ServerRequestInterface $request[, string $enableList = 'table,fields,query,group,order,limit' ]) : string
Parameters
- $modSettings : array<string|int, mixed>
- $request : ServerRequestInterface
- $enableList : string = 'table,fields,query,group,order,limit'
Return values
stringmakeStoreControl()
protected
makeStoreControl() : string
Return values
stringmakeValueList()
protected
makeValueList(string $fieldName, string $fieldValue, array<string|int, mixed> $conf, string $table, string $splitString) : string
Parameters
- $fieldName : string
- $fieldValue : string
- $conf : array<string|int, mixed>
- $table : string
- $splitString : string
Return values
stringmenuConfig()
Configure menu
protected
menuConfig(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
mkCompSelect()
protected
mkCompSelect(string $name, string $comparison, int $neg) : string
Parameters
- $name : string
- $comparison : string
- $neg : int
Return values
stringmkFieldToInputSelect()
protected
mkFieldToInputSelect(string $name, string $fieldName) : string
Parameters
- $name : string
- $fieldName : string
Return values
stringmkOperatorSelect()
protected
mkOperatorSelect(string $name, string $op, bool $draw, bool $submit) : string
Parameters
- $name : string
- $op : string
- $draw : bool
- $submit : bool
Return values
stringmkTableSelect()
protected
mkTableSelect(string $name, string $cur) : string
Parameters
- $name : string
- $cur : string
Return values
stringmkTypeSelect()
protected
mkTypeSelect(string $name, string $fieldName[, string $prepend = 'FIELD_' ]) : string
Parameters
- $name : string
- $fieldName : string
- $prepend : string = 'FIELD_'
Return values
stringprintCodeArray()
protected
printCodeArray(array<string|int, mixed> $codeArr[, int $recursionLevel = 0 ]) : string
Parameters
- $codeArr : array<string|int, mixed>
- $recursionLevel : int = 0
Return values
stringprocesData()
protected
procesData(ServerRequestInterface $request[, array<string|int, mixed> $qC = [] ]) : void
Parameters
- $request : ServerRequestInterface
- $qC : array<string|int, mixed> = []
procesStoreControl()
protected
procesStoreControl(ServerRequestInterface $request) : string
Parameters
- $request : ServerRequestInterface
Return values
stringqueryMaker()
protected
queryMaker(ServerRequestInterface $request) : string
Parameters
- $request : ServerRequestInterface
Return values
stringrecordStatisticsAction()
Records overview
protected
recordStatisticsAction(ModuleTemplate $view, ServerRequestInterface $request) : ResponseInterface
Parameters
- $view : ModuleTemplate
- $request : ServerRequestInterface
Return values
ResponseInterfacereferenceIndexAction()
Check and update reference index.
protected
referenceIndexAction(ModuleTemplate $view, ServerRequestInterface $request) : ResponseInterface
Parameters
- $view : ModuleTemplate
- $request : ServerRequestInterface
Return values
ResponseInterfacerelationsAction()
Show reference list
protected
relationsAction(ModuleTemplate $view) : ResponseInterface
Parameters
- $view : ModuleTemplate
Return values
ResponseInterfaceresultRowDisplay()
protected
resultRowDisplay(array<string|int, mixed> $row, array<string|int, mixed> $conf, string $table, ServerRequestInterface $request) : string
Parameters
- $row : array<string|int, mixed>
- $conf : array<string|int, mixed>
- $table : string
- $request : ServerRequestInterface
Return values
stringresultRowTitles()
protected
resultRowTitles(array<string|int, mixed>|null $row, array<string|int, mixed> $conf) : string
Parameters
- $row : array<string|int, mixed>|null
-
Table columns
- $conf : array<string|int, mixed>
Return values
stringsearch()
protected
search(ServerRequestInterface $request) : string
Parameters
- $request : ServerRequestInterface
Return values
stringsearchAction()
Search (Full / Advanced)
protected
searchAction(ModuleTemplate $view, ServerRequestInterface $request) : ResponseInterface
Parameters
- $view : ModuleTemplate
- $request : ServerRequestInterface
Return values
ResponseInterfacesetAndCleanUpExternalLists()
protected
setAndCleanUpExternalLists(string $name, string $list[, string $force = '' ]) : void
Parameters
- $name : string
- $list : string
- $force : string = ''
setFormName()
protected
setFormName(string $formName) : void
Parameters
- $formName : string
setUpDocHeader()
Generate doc header drop-down and shortcut button.
protected
setUpDocHeader(ModuleTemplate $moduleTemplate) : void
Parameters
- $moduleTemplate : ModuleTemplate
updateIcon()
protected
updateIcon() : string
Return values
stringverifyComparison()
protected
verifyComparison(string $comparison, int $neg) : int
Parameters
- $comparison : string
- $neg : int
Return values
intverifyType()
protected
verifyType(string $fieldName) : string
Parameters
- $fieldName : string