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
$target
protected
string
$target
= ''
$type
protected
string
$type
= \TYPO3\CMS\Core\LinkHandling\LinkService::TYPE_UNKNOWN
$url
protected
string
$url
Methods
__construct()
public
__construct(string $type, string $url) : mixed
Parameters
- $type : string
- $url : string
__toString()
public
__toString() : string
Return values
stringgetAttribute()
public
getAttribute(string $attributeName) : string|null
Parameters
- $attributeName : string
Return values
string|nullgetAttributes()
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|nullgetTarget()
public
getTarget() : string
Return values
stringgetType()
public
getType() : string
Return values
stringgetUrl()
public
getUrl() : string
Return values
stringhasAttribute()
public
hasAttribute(string $attributeName) : bool
Parameters
- $attributeName : string
Return values
booljsonSerialize()
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
selfwithAttributes()
public
withAttributes(array<string|int, mixed> $additionalAttributes[, bool $resetExistingAttributes = false ]) : self
Parameters
- $additionalAttributes : array<string|int, mixed>
- $resetExistingAttributes : bool = false
Return values
selfwithLinkConfiguration()
public
withLinkConfiguration(array<string|int, mixed> $configuration) : self
Parameters
- $configuration : array<string|int, mixed>
Return values
selfwithLinkText()
public
withLinkText(string $linkText) : self
Parameters
- $linkText : string
Return values
selfwithTarget()
public
withTarget(string $target) : self
Parameters
- $target : string