AbstractElementBrowser uses PageRendererBackendSetupTrait
Base class for element browsers This class should only be used internally. Extensions must implement the ElementBrowserInterface.
This class is a specific LinkBrowser implementation and is not part of the TYPO3's Core API.
Table of Contents
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.
- $extensionConfiguration : ExtensionConfiguration
- $iconFactory : IconFactory
- $identifier : string
- The element browsers unique identifier
- $pageRenderer : PageRenderer
- $request : ServerRequestInterface|null
- $uriBuilder : UriBuilder
- $view : ViewInterface
Methods
- __construct() : mixed
- getIdentifier() : string
- Returns the identifier for the browser
- 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']
- 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];
$extensionConfiguration read-only
protected
ExtensionConfiguration
$extensionConfiguration
$iconFactory read-only
protected
IconFactory
$iconFactory
$identifier
The element browsers unique identifier
protected
string
$identifier
= ''
$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
- $iconFactory : IconFactory
- $pageRenderer : PageRenderer
- $uriBuilder : UriBuilder
- $extensionConfiguration : ExtensionConfiguration
- $backendViewFactory : BackendViewFactory
getIdentifier()
Returns the identifier for the browser
public
getIdentifier() : string
Return values
stringsetRequest()
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()
Splits parts of $this->bparams and returns needed data attributes for the Javascript
protected
getBParamDataAttributes() : array<string, string>
Return values
array<string, string> —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 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
protected
getUriForFileName(ServerRequestInterface $request, string $filename) : string
Parameters
- $request : ServerRequestInterface
- $filename : string
-
The input filename/filepath to evaluate
Return values
string —Returns the filename of $filename if valid, otherwise blank string.
initialize()
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
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