LinkResult implements LinkResultInterface, JsonSerializable, ArrayAccess

This class represents a created link to a resource (page, email etc), coming from linkService and after it was executed by the LinkBuilders (mostly in Frontend) after it is called from Typolink.

Table of Contents

Interfaces

LinkResultInterface
Interface representing a created link to any type (page, file etc).
JsonSerializable
ArrayAccess

Properties

$additionalAttributes  : array<string|int, mixed>
$linkConfiguration  : array<string|int, mixed>
$linkText  : string|null
$target  : string
$type  : string
$url  : string

Methods

__construct()  : mixed
__toString()  : string
getAttribute()  : string|null
getAttributes()  : array<string|int, mixed>
getLinkConfiguration()  : array<string, string>
getLinkText()  : string|null
getTarget()  : string
getType()  : string
getUrl()  : string
hasAttribute()  : bool
jsonSerialize()  : array<string|int, mixed>
offsetExists()  : mixed
Kept for legacy reasons, will be removed in TYPO3 v12.0.
offsetGet()  : mixed
offsetSet()  : mixed
offsetUnset()  : mixed
withAttribute()  : self
withAttributes()  : self
withLinkConfiguration()  : self
withLinkText()  : self
withTarget()  : self

Properties

$additionalAttributes

protected array<string|int, mixed> $additionalAttributes = []

$linkConfiguration

protected array<string|int, mixed> $linkConfiguration = []

$linkText

protected string|null $linkText = null

$type

protected string $type = \TYPO3\CMS\Core\LinkHandling\LinkService::TYPE_UNKNOWN

Methods

__construct()

public __construct(string $type, string $url) : mixed
Parameters
$type : string
$url : string

__toString()

public __toString() : string
Return values
string

getAttribute()

public getAttribute(string $attributeName) : string|null
Parameters
$attributeName : string
Return values
string|null

getAttributes()

public getAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getLinkConfiguration()

public getLinkConfiguration() : array<string, string>
Return values
array<string, string>

getLinkText()

public getLinkText() : string|null
Return values
string|null

getTarget()

public getTarget() : string
Return values
string

getType()

public getType() : string
Return values
string

getUrl()

public getUrl() : string
Return values
string

hasAttribute()

public hasAttribute(string $attributeName) : bool
Parameters
$attributeName : string
Return values
bool

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

offsetExists()

Kept for legacy reasons, will be removed in TYPO3 v12.0.

public offsetExists(mixed $offset) : mixed

This is built because the LinkBuilders now return an object instead an array with three items.

Parameters
$offset : mixed
Attributes
#[ReturnTypeWillChange]

offsetGet()

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed
Attributes
#[ReturnTypeWillChange]

offsetSet()

public offsetSet(mixed $offset, mixed $value) : mixed
Parameters
$offset : mixed
$value : mixed
Attributes
#[ReturnTypeWillChange]

offsetUnset()

public offsetUnset(mixed $offset) : mixed
Parameters
$offset : mixed
Attributes
#[ReturnTypeWillChange]

withAttribute()

public withAttribute(string $attributeName, string|null $attributeValue) : self
Parameters
$attributeName : string
$attributeValue : string|null
Return values
self

withAttributes()

public withAttributes(array<string|int, mixed> $additionalAttributes[, bool $resetExistingAttributes = false ]) : self
Parameters
$additionalAttributes : array<string|int, mixed>
$resetExistingAttributes : bool = false
Return values
self

withLinkConfiguration()

public withLinkConfiguration(array<string|int, mixed> $configuration) : self
Parameters
$configuration : array<string|int, mixed>
Return values
self

withLinkText()

public withLinkText(string $linkText) : self
Parameters
$linkText : string
Return values
self

withTarget()

public withTarget(string $target) : self
Parameters
$target : string
Return values
self

        
On this page

Search results