LinkBrowserController

class \TYPO3\CMS\Backend\Controller\LinkBrowserController

Extends
AbstractLinkBrowserController

Extended controller for link browser

Attributes

#[AsController]

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  : string[]
List of available link attribute fields
$linkAttributeValues  : string[]
Values of the link attributes
$linkHandlers  : array<string, array>
$linkService  : LinkService
$pageRenderer  : PageRenderer
$parameters  : array
$typoLinkCodecService  : TypoLinkCodecService
$uriBuilder  : UriBuilder

Methods

__construct()  : mixed
encodeTypoLink()  : ResponseInterface
Encode a typolink via ajax.
getConfiguration()  : array
getParameters()  : array
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[]
Returns an array definition of the top menu
getAllowedItems()  : string[]
getAllowedLinkAttributes()  : string[]
getBackendFavicon()  : string
Retrieves configured favicon for backend with fallback.
getBackendUser()  : BackendUserAuthentication
getBodyTagAttributes()  : string[]
getCurrentPageId()  : int
getDisplayedLinkHandlerId()  : string
getLanguageService()  : LanguageService
getLinkAttributeFieldDefinitions()  : string[]
Create an array of link attribute field rendering definitions
getLinkHandlers()  : array<string, array>
Reads the configured link handlers from page TSconfig
getUriForFileName()  : string
Returns the uri for a system resource
initCurrentUrl()  : void
Initialize $this->currentLinkParts and $this->currentLinkHandler
initDocumentTemplate()  : void
initLinkAttributeDefaults()  : void
Prefill target and class of a new link with the defaults of the displayed link handler, unless the request already carries a value. An existing link keeps its attributes, including the ones it does not carry, because the RTE passes only the attributes a link has.
initVariables()  : void
loadLinkHandlers()  : void
loadStylesheets()  : void
Load all registered stylesheets from $GLOBALS['TYPO3_CONF_VARS']['BE']['stylesheets']
renderCurrentUrl()  : void
Add the currently set Link 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

Properties

$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.

$displayedLinkHandlerId

The ID of the displayed link handler This is read from the 'act' GET parameter

protected string $displayedLinkHandlerId = ''

$eventDispatcher

protected EventDispatcherInterface $eventDispatcher

$linkAttributeFields

List of available link attribute fields

protected string[] $linkAttributeFields = []

$linkAttributeValues

Values of the link attributes

protected string[] $linkAttributeValues = []

$linkHandlers

protected array<string, array> $linkHandlers = []

Methods

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

ResponseInterface

getConfiguration()

public getConfiguration() : array

Return values

array

getParameters()

public getParameters() : array

Return values

array

getUrlParameters()

public getUrlParameters([array|null $overrides = null ]) : array{act: string, P: array}

Parameters

$overrides : array|null = null

Return values

array{act: string, P: array} —

Array of parameters which have to be added to URLs

injectEventDispatcher()

public injectEventDispatcher(EventDispatcherInterface $eventDispatcher) : void

Parameters

$eventDispatcher : EventDispatcherInterface

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(ServerRequestInterface $request) : array[]

Parameters

$request : ServerRequestInterface

Return values

array[]

getAllowedLinkAttributes()

protected getAllowedLinkAttributes() : string[]

Return values

string[]

getBackendFavicon()

Retrieves configured favicon for backend with fallback.

protected getBackendFavicon(ExtensionConfiguration $extensionConfiguration, ServerRequestInterface $request) : string

Parameters

$extensionConfiguration : ExtensionConfiguration
$request : ServerRequestInterface

Return values

string

getBodyTagAttributes()

protected getBodyTagAttributes() : string[]

Return values

string[] —

Array of body-tag attributes

getCurrentPageId()

protected getCurrentPageId() : int

Return values

int

getDisplayedLinkHandlerId()

protected getDisplayedLinkHandlerId() : string

Return values

string

getLinkAttributeFieldDefinitions()

Create an array of link attribute field rendering definitions

protected getLinkAttributeFieldDefinitions() : string[]

Return values

string[]

getLinkHandlers()

Reads the configured link handlers from page TSconfig

protected getLinkHandlers() : array<string, array>

Return values

array<string, array>

initCurrentUrl()

Initialize $this->currentLinkParts and $this->currentLinkHandler

protected initCurrentUrl() : void

initDocumentTemplate()

protected initDocumentTemplate() : void

initLinkAttributeDefaults()

Prefill target and class of a new link with the defaults of the displayed link handler, unless the request already carries a value. An existing link keeps its attributes, including the ones it does not carry, because the RTE passes only the attributes a link has.

protected initLinkAttributeDefaults() : void

initVariables()

protected initVariables(ServerRequestInterface $request) : void

Parameters

$request : ServerRequestInterface

loadLinkHandlers()

protected loadLinkHandlers() : void

Tags

throws
UnexpectedValueException

loadStylesheets()

Load all registered stylesheets from $GLOBALS['TYPO3_CONF_VARS']['BE']['stylesheets']

protected loadStylesheets(PageRenderer $pageRenderer) : void

Parameters

$pageRenderer : PageRenderer

renderLinkAttributeFields()

Renders the link attributes for the selected link handler

protected renderLinkAttributeFields(ViewInterface $view) : string

Parameters

$view : ViewInterface

Return values

string

strReplaceRecursively()

protected strReplaceRecursively(string $search, string $replace, array $array) : array

Parameters

$search : string
$replace : string
$array : array

Return values

array
On this page