LinkBrowserController extends AbstractLinkBrowserController
Extended controller for link browser
Table of Contents
Properties
- $backendViewFactory : BackendViewFactory
- $currentLinkHandler : LinkHandlerInterface|null
- Link handler responsible for the current active link
- $currentLinkHandlerId : string
- The ID of the currently active link handler
- $currentLinkParts : array<string, mixed>
- All parts of the current link.
- $dependencyOrderingService : DependencyOrderingService
- $displayedLinkHandler : LinkHandlerInterface|null
- Link handler to be displayed
- $displayedLinkHandlerId : string
- The ID of the displayed link handler This is read from the 'act' GET parameter
- $eventDispatcher : EventDispatcherInterface
- $extensionConfiguration : ExtensionConfiguration
- $flashMessageService : FlashMessageService
- $linkAttributeFields : array<string|int, string>
- List of available link attribute fields
- $linkAttributeValues : array<string|int, string>
- Values of the link attributes
- $linkHandlers : array<string, array<string|int, mixed>>
- $linkService : LinkService
- $pageRenderer : PageRenderer
- $parameters : array<string|int, mixed>
- $thisScript : string
- URL of current request
- $typoLinkCodecService : TypoLinkCodecService
- $uriBuilder : UriBuilder
Methods
- __construct() : mixed
- encodeTypoLink() : ResponseInterface
- Encode a typolink via ajax.
- getConfiguration() : array<string|int, mixed>
- getParameters() : array<string|int, mixed>
- getScriptUrl() : string
- getUrlParameters() : array{act: string, P: array}
- injectBackendViewFactory() : void
- injectDependencyOrderingService() : void
- injectEventDispatcher() : void
- injectExtensionConfiguration() : void
- injectPageRenderer() : void
- injectUriBuilder() : void
- mainAction() : ResponseInterface
- Injects the request object for the current request or subrequest As this controller goes only through the main() method, it is rather simple for now
- areFieldChangeFunctionsValid() : bool
- Determines whether submitted field change functions are valid and are coming from the system and not from an external abuse.
- buildMenuArray() : array<string|int, array<string|int, mixed>>
- Returns an array definition of the top menu
- determineScriptUrl() : void
- Sets the script url depending on being a module or script request.
- getAllowedItems() : array<string|int, string>
- getAllowedLinkAttributes() : array<string|int, string>
- getBackendFavicon() : string
- Retrieves configured favicon for backend with fallback.
- getBackendUser() : BackendUserAuthentication
- getBodyTagAttributes() : array<string|int, string>
- getCurrentPageId() : int
- getDisplayedLinkHandlerId() : string
- getLanguageService() : LanguageService
- getLinkAttributeFieldDefinitions() : array<string|int, string>
- Create an array of link attribute field rendering definitions
- getLinkHandlers() : array<string, array<string|int, mixed>>
- Reads the configured link handlers from page TSconfig
- getNormalizedParams() : NormalizedParams
- getRegisteredStylesheetFolders() : array<string|int, mixed>
- Return an array of all stylesheet directories registered via $GLOBAlS['TBE_STYLES']['skins'].
- 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
- initCurrentUrl() : void
- Initialize $this->currentLinkParts and $this->currentLinkHandler
- initDocumentTemplate() : void
- initVariables() : void
- loadLinkHandlers() : void
- loadStylesheets() : void
- Load all registered stylesheets from $GLOBALS['TBE_STYLES'] "API"
- renderCurrentUrl() : void
- Add the currently set URL to the view
- renderLinkAttributeFields() : string
- Renders the link attributes for the selected link handler
- setUpBasicPageRendererForBackend() : void
- Sets mandatory parameters for the PageRenderer.
- strReplaceRecursively() : array<string|int, mixed>
Properties
$backendViewFactory
protected
BackendViewFactory
$backendViewFactory
$currentLinkHandler
Link handler responsible for the current active link
protected
LinkHandlerInterface|null
$currentLinkHandler
= null
$currentLinkHandlerId
The ID of the currently active link handler
protected
string
$currentLinkHandlerId
$currentLinkParts
All parts of the current link.
protected
array<string, mixed>
$currentLinkParts
= []
Comprised of url information and additional link parameters.
$dependencyOrderingService
protected
DependencyOrderingService
$dependencyOrderingService
$displayedLinkHandler
Link handler to be displayed
protected
LinkHandlerInterface|null
$displayedLinkHandler
= null
$displayedLinkHandlerId
The ID of the displayed link handler This is read from the 'act' GET parameter
protected
string
$displayedLinkHandlerId
= ''
$eventDispatcher
protected
EventDispatcherInterface
$eventDispatcher
$extensionConfiguration
protected
ExtensionConfiguration
$extensionConfiguration
$flashMessageService read-only
protected
FlashMessageService
$flashMessageService
$linkAttributeFields
List of available link attribute fields
protected
array<string|int, string>
$linkAttributeFields
= []
$linkAttributeValues
Values of the link attributes
protected
array<string|int, string>
$linkAttributeValues
= []
$linkHandlers
protected
array<string, array<string|int, mixed>>
$linkHandlers
= []
$linkService read-only
protected
LinkService
$linkService
$pageRenderer
protected
PageRenderer
$pageRenderer
$parameters
protected
array<string|int, mixed>
$parameters
$thisScript
URL of current request
protected
string
$thisScript
= ''
$typoLinkCodecService read-only
protected
TypoLinkCodecService
$typoLinkCodecService
$uriBuilder
protected
UriBuilder
$uriBuilder
Methods
__construct()
public
__construct(LinkService $linkService, TypoLinkCodecService $typoLinkCodecService, FlashMessageService $flashMessageService) : mixed
Parameters
- $linkService : LinkService
- $typoLinkCodecService : TypoLinkCodecService
- $flashMessageService : FlashMessageService
encodeTypoLink()
Encode a typolink via ajax.
public
encodeTypoLink(ServerRequestInterface $request) : ResponseInterface
This avoids implementing the encoding functionality again in JS for the browser.
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacegetConfiguration()
public
getConfiguration() : array<string|int, mixed>
Return values
array<string|int, mixed>getParameters()
public
getParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>getScriptUrl()
public
getScriptUrl() : string
Return values
stringgetUrlParameters()
public
getUrlParameters([array<string|int, mixed>|null $overrides = null ]) : array{act: string, P: array}
Parameters
- $overrides : array<string|int, mixed>|null = null
Return values
array{act: string, P: array} —Array of parameters which have to be added to URLs
injectBackendViewFactory()
public
injectBackendViewFactory(BackendViewFactory $backendViewFactory) : void
Parameters
- $backendViewFactory : BackendViewFactory
injectDependencyOrderingService()
public
injectDependencyOrderingService(DependencyOrderingService $dependencyOrderingService) : void
Parameters
- $dependencyOrderingService : DependencyOrderingService
injectEventDispatcher()
public
injectEventDispatcher(EventDispatcherInterface $eventDispatcher) : void
Parameters
- $eventDispatcher : EventDispatcherInterface
injectExtensionConfiguration()
public
injectExtensionConfiguration(ExtensionConfiguration $extensionConfiguration) : void
Parameters
- $extensionConfiguration : ExtensionConfiguration
injectPageRenderer()
public
injectPageRenderer(PageRenderer $pageRenderer) : void
Parameters
- $pageRenderer : PageRenderer
injectUriBuilder()
public
injectUriBuilder(UriBuilder $uriBuilder) : void
Parameters
- $uriBuilder : UriBuilder
mainAction()
Injects the request object for the current request or subrequest As this controller goes only through the main() method, it is rather simple for now
public
mainAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
-
the current request
Return values
ResponseInterface —the response with the content
areFieldChangeFunctionsValid()
Determines whether submitted field change functions are valid and are coming from the system and not from an external abuse.
protected
areFieldChangeFunctionsValid([bool $handleFlexformSections = false ]) : bool
Parameters
- $handleFlexformSections : bool = false
-
Whether to handle flexform sections differently
Return values
bool —Whether the submitted field change functions are valid
buildMenuArray()
Returns an array definition of the top menu
protected
buildMenuArray() : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>>determineScriptUrl()
Sets the script url depending on being a module or script request.
protected
determineScriptUrl(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
getAllowedItems()
protected
getAllowedItems() : array<string|int, string>
Return values
array<string|int, string>getAllowedLinkAttributes()
protected
getAllowedLinkAttributes() : array<string|int, string>
Return values
array<string|int, string>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|int, string>
Return values
array<string|int, string> —Array of body-tag attributes
getCurrentPageId()
protected
getCurrentPageId() : int
Return values
intgetDisplayedLinkHandlerId()
protected
getDisplayedLinkHandlerId() : string
Return values
stringgetLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServicegetLinkAttributeFieldDefinitions()
Create an array of link attribute field rendering definitions
protected
getLinkAttributeFieldDefinitions() : array<string|int, string>
Return values
array<string|int, string>getLinkHandlers()
Reads the configured link handlers from page TSconfig
protected
getLinkHandlers() : array<string, array<string|int, mixed>>
Return values
array<string, array<string|int, mixed>>getNormalizedParams()
protected
getNormalizedParams(ServerRequestInterface $request) : NormalizedParams
Parameters
- $request : ServerRequestInterface
Return values
NormalizedParamsgetRegisteredStylesheetFolders()
Return an array of all stylesheet directories registered via $GLOBAlS['TBE_STYLES']['skins'].
protected
getRegisteredStylesheetFolders() : array<string|int, mixed>
will be removed in TYPO3 v13.0. Use $GLOBALS['TYPO3_CONF_VARS']['BE']['stylesheets'] instead.
Return values
array<string|int, mixed>getUriForFileName()
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.
initCurrentUrl()
Initialize $this->currentLinkParts and $this->currentLinkHandler
protected
initCurrentUrl() : void
initDocumentTemplate()
protected
initDocumentTemplate() : void
initVariables()
protected
initVariables(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
loadLinkHandlers()
protected
loadLinkHandlers() : void
Tags
loadStylesheets()
Load all registered stylesheets from $GLOBALS['TBE_STYLES'] "API"
protected
loadStylesheets(PageRenderer $pageRenderer) : void
Parameters
- $pageRenderer : PageRenderer
renderCurrentUrl()
Add the currently set URL to the view
protected
renderCurrentUrl(ViewInterface $view) : void
Parameters
- $view : ViewInterface
renderLinkAttributeFields()
Renders the link attributes for the selected link handler
protected
renderLinkAttributeFields(ViewInterface $view) : string
Parameters
- $view : ViewInterface
Return values
stringsetUpBasicPageRendererForBackend()
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
strReplaceRecursively()
protected
strReplaceRecursively(string $search, string $replace, array<string|int, mixed> $array) : array<string|int, mixed>
Parameters
- $search : string
- $replace : string
- $array : array<string|int, mixed>