\phpDocumentor\Transformer\Writer\Twig\LinkRendererTarget

The target of a link and how it should be presented.

Links in phpDocumentor can be based on any number of types of input, ranging from FQCNs, Descriptors, absolute urls to things like references.

To simplify the rendering of these links, we first analyze and transform the input into this Target object. Once the object is formed, it is passed onto the {@see \phpDocumentor\Transformer\Writer\Twig\LinkRenderer\LinkAdapter} to transform it into an actual HTML link that can be shown.

Summary

Methods
Properties
Constants
__construct()
getTitle()
getAbbreviation()
getUrl()
getPresentation()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
setPresentation()
$abbreviation
$presentation
$title
$url
N/A

Properties

$abbreviation

$abbreviation
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
 : 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string|null

Targets can optionally have their link text be an abbreviation.

When this field is not null, it is used as the link text and the regular title is set as the title attribute of a generated ABBR tag.

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Type

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string|null

$presentation

$presentation
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
 : 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string

How should the HTML be formatted.

The {@see \phpDocumentor\Transformer\Writer\Twig\LinkRenderer\HtmlFormatter} is responsible for transforming this target into HTML; but the presentation of a link can vary depending on where it is used. When used in twig templates, the caller can indicate how an element should be rendered according to this presentation.

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Type

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string

$title

$title
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
 : 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string

The title of the target that needs to be shown in the link text, or when an abbreviation is present as part of the ABBR tag's title attribute.

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Type

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string

$url

$url
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
 : 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string|null

The link url of this Target.

The {@see \phpDocumentor\Transformer\Writer\Twig\LinkRenderer} is responsible for converting an 'input' to something that can be linked to; and the URL represents the thing that should be linked to.

Sometimes, input cannot be resolved (FQCNs that we do not document). When that happens the URL is null, and the {@see \phpDocumentor\Transformer\Writer\Twig\LinkRenderer\HtmlFormatter} will still render a reference to that FQCN, but without a link.

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Type

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string|null

Methods

__construct()

__construct(
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string  $title, 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string|null  $url = null, 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string  $presentation = LinkRenderer::PRESENTATION_NORMAL) 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
: mixed

Parameters

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string $title
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string|null $url
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string $presentation
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Returns

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 mixed —

getTitle()

getTitle() 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
: string

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Returns

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string —

getAbbreviation()

getAbbreviation() 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
: string|null

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Returns

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string|null —

getUrl()

getUrl() 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
: string|null

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Returns

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string|null —

getPresentation()

getPresentation() 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
: string

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Returns

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string —

setPresentation()

setPresentation(
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string  $presentation) 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
: void

Parameters

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string $presentation
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50