‪TYPO3CMS  11.5
TYPO3\CMS\Frontend\Typolink\LinkResult Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\Typolink\LinkResult:
TYPO3\CMS\Frontend\Typolink\LinkResultInterface

Public Member Functions

 __construct (string $type, string $url)
 
 getUrl ()
 
 getType ()
 
 getTarget ()
 
 withTarget (string $target)
 
 withLinkConfiguration (array $configuration)
 
 withLinkText (string $linkText)
 
 getLinkText ()
 
 withAttributes (array $additionalAttributes, bool $resetExistingAttributes=false)
 
 withAttribute (string $attributeName, ?string $attributeValue)
 
 jsonSerialize ()
 
 hasAttribute (string $attributeName)
 
 getAttribute (string $attributeName)
 
 getAttributes ()
 
 __toString ()
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 

Public Attributes

array< string, function getLinkConfiguration():array { return $this-> linkConfiguration
 

Protected Attributes

string $type = LinkService::TYPE_UNKNOWN
 
string $url
 
string $target = ''
 
array $additionalAttributes = []
 
string $linkText = null
 
array $linkConfiguration = []
 

Detailed Description

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.

Definition at line 26 of file LinkResult.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Frontend\Typolink\LinkResult::__construct ( string  $type,
string  $url 
)

Member Function Documentation

◆ __toString()

TYPO3\CMS\Frontend\Typolink\LinkResult::__toString ( )

◆ getAttribute()

TYPO3\CMS\Frontend\Typolink\LinkResult::getAttribute ( string  $attributeName)

◆ getAttributes()

TYPO3\CMS\Frontend\Typolink\LinkResult::getAttributes ( )

◆ getLinkText()

TYPO3\CMS\Frontend\Typolink\LinkResult::getLinkText ( )

◆ getTarget()

TYPO3\CMS\Frontend\Typolink\LinkResult::getTarget ( )

◆ getType()

TYPO3\CMS\Frontend\Typolink\LinkResult::getType ( )

◆ getUrl()

TYPO3\CMS\Frontend\Typolink\LinkResult::getUrl ( )

◆ hasAttribute()

TYPO3\CMS\Frontend\Typolink\LinkResult::hasAttribute ( string  $attributeName)

Implements TYPO3\CMS\Frontend\Typolink\LinkResultInterface.

Definition at line 155 of file LinkResult.php.

◆ jsonSerialize()

TYPO3\CMS\Frontend\Typolink\LinkResult::jsonSerialize ( )

◆ offsetExists()

TYPO3\CMS\Frontend\Typolink\LinkResult::offsetExists (   $offset)

Kept for legacy reasons, will be removed in TYPO3 v12.0. This is built because the LinkBuilders now return an object instead an array with three items.

Definition at line 203 of file LinkResult.php.

◆ offsetGet()

TYPO3\CMS\Frontend\Typolink\LinkResult::offsetGet (   $offset)

◆ offsetSet()

TYPO3\CMS\Frontend\Typolink\LinkResult::offsetSet (   $offset,
  $value 
)

Definition at line 241 of file LinkResult.php.

◆ offsetUnset()

TYPO3\CMS\Frontend\Typolink\LinkResult::offsetUnset (   $offset)

Definition at line 263 of file LinkResult.php.

◆ withAttribute()

TYPO3\CMS\Frontend\Typolink\LinkResult::withAttribute ( string  $attributeName,
?string  $attributeValue 
)

Implements TYPO3\CMS\Frontend\Typolink\LinkResultInterface.

Definition at line 116 of file LinkResult.php.

◆ withAttributes()

TYPO3\CMS\Frontend\Typolink\LinkResult::withAttributes ( array  $additionalAttributes,
bool  $resetExistingAttributes = false 
)

◆ withLinkConfiguration()

TYPO3\CMS\Frontend\Typolink\LinkResult::withLinkConfiguration ( array  $configuration)

Definition at line 71 of file LinkResult.php.

◆ withLinkText()

TYPO3\CMS\Frontend\Typolink\LinkResult::withLinkText ( string  $linkText)

◆ withTarget()

TYPO3\CMS\Frontend\Typolink\LinkResult::withTarget ( string  $target)

Member Data Documentation

◆ $additionalAttributes

array TYPO3\CMS\Frontend\Typolink\LinkResult::$additionalAttributes = []
protected

◆ $linkConfiguration

array TYPO3\CMS\Frontend\Typolink\LinkResult::$linkConfiguration = []
protected

Definition at line 33 of file LinkResult.php.

◆ $linkText

string TYPO3\CMS\Frontend\Typolink\LinkResult::$linkText = null
protected

◆ $target

◆ $type

string TYPO3\CMS\Frontend\Typolink\LinkResult::$type = LinkService::TYPE_UNKNOWN
protected

◆ $url

◆ linkConfiguration

array<string, function getLinkConfiguration(): array { return $this-> TYPO3\CMS\Frontend\Typolink\LinkResult::linkConfiguration
Returns
‪array<string, string>

Definition at line 68 of file LinkResult.php.