LinkBrowserController

class \TYPO3\CMS\Backend\Controller\LinkBrowserController

Extends
AbstractLinkBrowserController

Extended controller for link browser

Table of Contents

Properties

$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
Link handler to be displayed
$displayedLinkHandlerId  : string
The ID of the displayed link handler
$hookObjects  : array
$linkAttributeFields  : string[]
List of available link attribute fields
$linkAttributeValues  : string[]
Values of the link attributes
$linkHandlers  : array<string, array>
$linkService  : LinkService
$moduleTemplate  : ModuleTemplate
$moduleTemplateFactory  : ModuleTemplateFactory
$pageRenderer  : PageRenderer
$parameters  : array
$thisScript  : string
URL of current request
$uriBuilder  : UriBuilder

Methods

__construct()  : mixed
encodeTypoLink()  : ResponseInterface
Encode a typolink via ajax
getConfiguration()  : array
Retrieve the configuration
getParameters()  : array
getScriptUrl()  : string
getUrlParameters()  : array
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
determineScriptUrl()  : mixed
Sets the script url depending on being a module or script request
getAllowedItems()  : string[]
Get the allowed items or tabs
getAllowedLinkAttributes()  : string[]
Get the allowed link attributes
getBackendUser()  : BackendUserAuthentication
getBodyTagAttributes()  : string[]
Get attributes for the body tag
getCurrentPageId()  : int
Return the ID of current page
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
init()  : mixed
Initialize the controller
initCurrentUrl()  : mixed
Initialize $this->currentLinkParts
initDocumentTemplate()  : mixed
Initialize body tag parameters, but can be used for other parts as well
initHookObjects()  : mixed
Initialize hook objects implementing the interface
initVariables()  : mixed
loadLinkHandlers()  : mixed
renderCurrentUrl()  : mixed
Add the currently set URL to the view
renderLinkAttributeFields()  : string
Renders the link attributes for the selected link handler
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

protected string $displayedLinkHandlerId = ''

This is read from the 'act' GET parameter

$hookObjects

protected array $hookObjects = []

$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 = []

$thisScript

URL of current request

protected string $thisScript = ''

Methods

Encode a typolink via ajax

public encodeTypoLink(ServerRequestInterface $request) : ResponseInterface

This avoids to implement the encoding functionality again in JS for the browser.

Parameters

$request : ServerRequestInterface

Return values

ResponseInterface

getConfiguration()

Retrieve the configuration

public getConfiguration() : array

Return values

array

getParameters()

public getParameters() : array

Return values

array

getScriptUrl()

public getScriptUrl() : string

Return values

string

getUrlParameters()

public getUrlParameters([array|null $overrides = null ]) : array

Parameters

$overrides : array|null = null

Return values

array —

Array of parameters which have to be added to URLs

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[]

Return values

array[]

getAllowedItems()

Get the allowed items or tabs

protected getAllowedItems() : string[]

Return values

string[]

getAllowedLinkAttributes()

Get the allowed link attributes

protected getAllowedLinkAttributes() : string[]

Return values

string[]

getBodyTagAttributes()

Get attributes for the body tag

protected getBodyTagAttributes() : string[]

Return values

string[] —

Array of body-tag attributes

getCurrentPageId()

Return the ID of current page

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>

init()

Initialize the controller

protected init() : mixed

initCurrentUrl()

Initialize $this->currentLinkParts

protected initCurrentUrl() : mixed

initDocumentTemplate()

Initialize body tag parameters, but can be used for other parts as well

protected initDocumentTemplate() : mixed

initHookObjects()

Initialize hook objects implementing the interface

protected initHookObjects() : mixed

Tags

throws
UnexpectedValueException

initVariables()

protected initVariables(ServerRequestInterface $request) : mixed

Parameters

$request : ServerRequestInterface

loadLinkHandlers()

protected loadLinkHandlers() : mixed

Tags

throws
UnexpectedValueException

renderCurrentUrl()

Add the currently set URL to the view

protected renderCurrentUrl() : mixed

renderLinkAttributeFields()

Renders the link attributes for the selected link handler

protected renderLinkAttributeFields() : string

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