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
- Active with TYPO3 Element Browser: Contains the name of the form field for which this window opens - thus allows us to make references back to the main window in which the form is.
- $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
- $uriBuilder : UriBuilder
- $view : ViewInterface
Methods
- __construct() : mixed
- getIdentifier() : string
- Returns the identifier for the browser
- getUrlParameters() : array<string|int, string>
- 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>
- Splits parts of $this->bparams and returns needed data attributes for the Javascript
- getLanguageService() : LanguageService
- getNormalizedParams() : NormalizedParams
- getRequest() : ServerRequestInterface
- getUriForFileName() : string
- Returns the uri of a relative reference, resolves the "EXT:" prefix (way of referring to files inside extensions) and checks that the file is inside the project root of the TYPO3 installation
- 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
Active with TYPO3 Element Browser: Contains the name of the form field for which this window opens - thus allows us to make references back to the main window in which the form is.
protected
string
$bparams
= ''
Example value: "data[pages][39][bodytext]|||tt_content|"
or "data[tt_content][NEW3fba56fde763d][image]|||gif,jpg,jpeg,tif,bmp,pcx,tga,png,pdf,ai|"
Values:
0: form field name reference, eg. "data[tt_content][123][image]"
1: htmlArea RTE parameters: editorNo:contentTypo3Language
2: RTE config parameters: RTEtsConfigParams
3: allowed types. Eg. "tt_content" or "gif,jpg,jpeg,tif,bmp,pcx,tga,png,pdf,ai"
4: IRRE uniqueness: target level object-id to perform actions/checks on, eg. "data-4-pages-4-nav_icon-sys_file_reference" ("data- $pArr = explode('|', $this->bparams);
$formFieldName = $pArr[0];
$allowedTablesOrFileTypes = $pArr[3]; 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. If the value is NOT set by GET parameter, then it will be restored from the module session data. The element browsers unique identifier Returns the identifier for the browser Provides an array or GET parameters for URL generation Array of values to include into the parameters Array of parameters which have to be added to URLs Session data for this class can be set from outside with this method. Session data array Session data and boolean which indicates that data needs to be stored in session because it's changed HTML content Retrieves configured favicon for backend with fallback. Array of body-tag attributes Splits parts of $this->bparams and returns needed data attributes for the Javascript Data attributes for Javascript Returns the uri of a relative reference, resolves the "EXT:" prefix
(way of referring to files inside extensions) and checks that the file is inside
the project root of the TYPO3 installation The input filename/filepath to evaluate Returns the filename of $filename if valid, otherwise blank string. Main initialization Load all registered stylesheets from $GLOBALS['TYPO3_CONF_VARS']['BE']['stylesheets'] This lists all content elements for the given list of tables Comma separated list of tables. Set to "*" if you want all tables. HTML code Sets mandatory parameters for the PageRenderer.-
$expandPage
protected
int|null
$expandPage
$extensionConfiguration
read-only
protected
ExtensionConfiguration
$extensionConfiguration
$iconFactory
read-only
protected
IconFactory
$iconFactory
$identifier
protected
string
$identifier
= 'db'
$modTSconfig
protected
array<string|int, mixed>
$modTSconfig
= []
$pageRenderer
read-only
protected
PageRenderer
$pageRenderer
$request
protected
ServerRequestInterface|null
$request
= null
$uriBuilder
read-only
protected
UriBuilder
$uriBuilder
$view
protected
ViewInterface
$view
Methods
__construct()
public
__construct(IconFactory $iconFactory, PageRenderer $pageRenderer, UriBuilder $uriBuilder, ExtensionConfiguration $extensionConfiguration, BackendViewFactory $backendViewFactory) : mixed
Parameters
getIdentifier()
public
getIdentifier() : string
Return values
string
getUrlParameters()
public
getUrlParameters(array<string|int, mixed> $values) : array<string|int, string>
Parameters
Return values
array<string|int, string>
—
processSessionData()
public
processSessionData(array<string|int, mixed> $data) : array<int, array<string|int, mixed>|bool>
Parameters
Return values
array<int, array<string|int, mixed>|bool>
—
render()
public
render() : string
Return values
string
—
setRequest()
public
setRequest(ServerRequestInterface $request) : void
Parameters
getBackendFavicon()
protected
getBackendFavicon(ExtensionConfiguration $extensionConfiguration, ServerRequestInterface $request) : string
Parameters
Return values
string
getBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthentication
getBodyTagAttributes()
protected
getBodyTagAttributes() : array<string, string>
Return values
array<string, string>
—
getBodyTagParameters()
protected
getBodyTagParameters() : string
Return values
string
getBParamDataAttributes()
protected
getBParamDataAttributes() : array<string, string>
Return values
array<string, string>
—
getLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageService
getNormalizedParams()
protected
getNormalizedParams(ServerRequestInterface $request) : NormalizedParams
Parameters
Return values
NormalizedParams
getRequest()
protected
getRequest() : ServerRequestInterface
Return values
ServerRequestInterface
getUriForFileName()
protected
getUriForFileName(ServerRequestInterface $request, string $filename) : string
Parameters
Return values
string
—
initialize()
protected
initialize(ServerRequestInterface $request) : mixed
Parameters
initVariables()
protected
initVariables(ServerRequestInterface $request) : mixed
Parameters
loadStylesheets()
protected
loadStylesheets(PageRenderer $pageRenderer) : void
Parameters
renderSearchBox()
protected
renderSearchBox(ServerRequestInterface $request, ElementBrowserRecordList $dblist, string $searchWord, int $searchLevels) : string
Parameters
Return values
string
renderTableRecords()
protected
renderTableRecords(string $tables) : string
Parameters
Return values
string
—
setUpBasicPageRendererForBackend()
protected
setUpBasicPageRendererForBackend(PageRenderer $pageRenderer, ExtensionConfiguration $extensionConfiguration, ServerRequestInterface $request, LanguageService $languageService) : void
Parameters
Search results