DatabaseBrowser extends AbstractElementBrowser implements ElementBrowserInterface, LinkParameterProviderInterface
Showing a page tree and allows you to browse for records. This is the modal rendered for type=group to add db relations to a group field.
This class is a specific LinkBrowser implementation and is not part of the TYPO3's Core API.
Table of Contents
Interfaces
- ElementBrowserInterface
- Element browsers are modals rendered when records are attached to FormEngine elements.
- LinkParameterProviderInterface
Properties
- $backendViewFactory : BackendViewFactory
- $bparams : string
- Legacy bparams string - kept for backward compatibility.
- $browserParameters : ElementBrowserParameters
- Typed DTO containing all browser parameters.
- $componentFactory : ComponentFactory
- $expandPage : int|null
- When you click a page title/expand icon to see the content of a certain page, this value will contain the ID of the expanded page.
- $extensionConfiguration : ExtensionConfiguration
- $iconFactory : IconFactory
- $identifier : string
- The element browsers unique identifier
- $modTSconfig : array<string|int, mixed>
- $pageRenderer : PageRenderer
- $request : ServerRequestInterface|null
- $tcaSchemaFactory : TcaSchemaFactory
- $uriBuilder : UriBuilder
- $view : ViewInterface
Methods
- __construct() : mixed
- getIdentifier() : string
- Returns the identifier for the browser
- getUrlParameters() : array<string, mixed>
- Provides an array or GET parameters for URL generation
- processSessionData() : array<int, array<string|int, mixed>|bool>
- Session data for this class can be set from outside with this method.
- render() : string
- setRequest() : void
- getBackendFavicon() : string
- Retrieves configured favicon for backend with fallback.
- getBackendUser() : BackendUserAuthentication
- getBodyTagAttributes() : array<string, string>
- getBodyTagParameters() : string
- getBParamDataAttributes() : array<string, string|null>
- Returns data attributes for the body tag, used by the Javascript.
- getLanguageService() : LanguageService
- getNormalizedParams() : NormalizedParams
- getRequest() : ServerRequestInterface
- getUriForFileName() : string
- Returns the uri for a system resource
- initialize() : mixed
- Main initialization
- initVariables() : mixed
- loadStylesheets() : void
- Load all registered stylesheets from $GLOBALS['TYPO3_CONF_VARS']['BE']['stylesheets']
- renderSearchBox() : string
- renderTableRecords() : string
- This lists all content elements for the given list of tables
- setUpBasicPageRendererForBackend() : void
- Sets mandatory parameters for the PageRenderer.
Properties
$backendViewFactory read-only
protected
BackendViewFactory
$backendViewFactory
$bparams
Legacy bparams string - kept for backward compatibility.
since TYPO3 v14.2, will be removed in TYPO3 v15.0. Use $this->browserParameters instead. Remove this in v15.0 together with ElementBrowserParameters::toBparams() and ::fromBparams()
protected
string
$bparams
= ''
$browserParameters
Typed DTO containing all browser parameters.
protected
ElementBrowserParameters
$browserParameters
$componentFactory read-only
protected
ComponentFactory
$componentFactory
$expandPage
When you click a page title/expand icon to see the content of a certain page, this value will contain the ID of the expanded page.
protected
int|null
$expandPage
If the value is NOT set by GET parameter, then it will be restored from the module session data.
$extensionConfiguration read-only
protected
ExtensionConfiguration
$extensionConfiguration
$iconFactory read-only
protected
IconFactory
$iconFactory
$identifier
The element browsers unique identifier
protected
string
$identifier
= 'db'
$modTSconfig
protected
array<string|int, mixed>
$modTSconfig
= []
$pageRenderer read-only
protected
PageRenderer
$pageRenderer
$request
protected
ServerRequestInterface|null
$request
= null
$tcaSchemaFactory read-only
protected
TcaSchemaFactory
$tcaSchemaFactory
$uriBuilder read-only
protected
UriBuilder
$uriBuilder
$view
protected
ViewInterface
$view
Methods
__construct()
public
__construct(IconFactory $iconFactory, PageRenderer $pageRenderer, UriBuilder $uriBuilder, ExtensionConfiguration $extensionConfiguration, BackendViewFactory $backendViewFactory, TcaSchemaFactory $tcaSchemaFactory, ComponentFactory $componentFactory) : mixed
Parameters
- $iconFactory : IconFactory
- $pageRenderer : PageRenderer
- $uriBuilder : UriBuilder
- $extensionConfiguration : ExtensionConfiguration
- $backendViewFactory : BackendViewFactory
- $tcaSchemaFactory : TcaSchemaFactory
- $componentFactory : ComponentFactory
getIdentifier()
Returns the identifier for the browser
public
getIdentifier() : string
Return values
stringgetUrlParameters()
Provides an array or GET parameters for URL generation
public
getUrlParameters(array<string|int, mixed> $values) : array<string, mixed>
Parameters
- $values : array<string|int, mixed>
-
Array of values to include into the parameters
Return values
array<string, mixed> —Array of parameters which have to be added to URLs
processSessionData()
Session data for this class can be set from outside with this method.
public
processSessionData(array<string|int, mixed> $data) : array<int, array<string|int, mixed>|bool>
Parameters
- $data : array<string|int, mixed>
-
Session data array
Return values
array<int, array<string|int, mixed>|bool> —Session data and boolean which indicates that data needs to be stored in session because it's changed
render()
public
render() : string
Return values
string —HTML content
setRequest()
public
setRequest(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
getBackendFavicon()
Retrieves configured favicon for backend with fallback.
protected
getBackendFavicon(ExtensionConfiguration $extensionConfiguration, ServerRequestInterface $request) : string
Parameters
- $extensionConfiguration : ExtensionConfiguration
- $request : ServerRequestInterface
Return values
stringgetBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetBodyTagAttributes()
protected
getBodyTagAttributes() : array<string, string>
Return values
array<string, string> —Array of body-tag attributes
getBodyTagParameters()
protected
getBodyTagParameters() : string
Return values
stringgetBParamDataAttributes()
Returns data attributes for the body tag, used by the Javascript.
protected
getBParamDataAttributes() : array<string, string|null>
Return values
array<string, string|null> —Data attributes for Javascript
getLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServicegetNormalizedParams()
protected
getNormalizedParams(ServerRequestInterface $request) : NormalizedParams
Parameters
- $request : ServerRequestInterface
Return values
NormalizedParamsgetRequest()
protected
getRequest() : ServerRequestInterface
Return values
ServerRequestInterfacegetUriForFileName()
Returns the uri for a system resource
protected
getUriForFileName(ServerRequestInterface $request, string $resourceIdentifier) : string
Parameters
- $request : ServerRequestInterface
- $resourceIdentifier : string
Tags
Return values
stringinitialize()
Main initialization
protected
initialize(ServerRequestInterface $request) : mixed
Parameters
- $request : ServerRequestInterface
initVariables()
protected
initVariables(ServerRequestInterface $request) : mixed
Parameters
- $request : ServerRequestInterface
loadStylesheets()
Load all registered stylesheets from $GLOBALS['TYPO3_CONF_VARS']['BE']['stylesheets']
protected
loadStylesheets(PageRenderer $pageRenderer) : void
Parameters
- $pageRenderer : PageRenderer
renderSearchBox()
protected
renderSearchBox(ServerRequestInterface $request, ElementBrowserRecordList $dblist, string $searchWord, int $searchLevels) : string
Parameters
- $request : ServerRequestInterface
- $dblist : ElementBrowserRecordList
- $searchWord : string
- $searchLevels : int
Return values
stringrenderTableRecords()
This lists all content elements for the given list of tables
protected
renderTableRecords(string $tables) : string
Parameters
- $tables : string
-
Comma separated list of tables. Set to "*" if you want all tables.
Return values
string —HTML code
setUpBasicPageRendererForBackend()
Sets mandatory parameters for the PageRenderer.
protected
setUpBasicPageRendererForBackend(PageRenderer $pageRenderer, ExtensionConfiguration $extensionConfiguration, ServerRequestInterface $request, LanguageService $languageService) : void
Parameters
- $pageRenderer : PageRenderer
- $extensionConfiguration : ExtensionConfiguration
- $request : ServerRequestInterface
- $languageService : LanguageService