LinkRenderer implements LinkRendererInterface
Renders an HTML anchor pointing to the location of the provided element.
Table of Contents
Interfaces
- LinkRendererInterface
- Renders an HTML anchor pointing to the location of the provided element.
Constants
- PRESENTATION_CLASS_SHORT : mixed = 'class:short'
- PRESENTATION_FILE_SHORT : mixed = 'file:short'
- PRESENTATION_NONE : mixed = ''
- PRESENTATION_NORMAL : mixed = 'normal'
- PRESENTATION_URL : mixed = 'url'
Properties
- $adapters : array<string|int, LinkRendererInterface>
- $destination : string
- $documentationSet : DocumentationSetInterface
- $htmlFormatter : HtmlFormatter
- $project : ProjectInterface
- $router : Router
Methods
- __clone() : mixed
- __construct() : mixed
- forDocumentationSet() : self
- getDestination() : string
- Returns the target directory relative to the Project's Root.
- getDocumentationSet() : DocumentationSetInterface
- getProject() : ProjectInterface
- render() : string|array<int, string>
- supports() : bool
- withDestination() : self
- Sets the destination directory relative to the Project's Root.
- withProject() : self
- createAdapters() : array<string|int, LinkRendererInterface>
Constants
PRESENTATION_CLASS_SHORT
public
final mixed
PRESENTATION_CLASS_SHORT
= 'class:short'
PRESENTATION_FILE_SHORT
public
final mixed
PRESENTATION_FILE_SHORT
= 'file:short'
PRESENTATION_NONE
public
final mixed
PRESENTATION_NONE
= ''
PRESENTATION_NORMAL
public
final mixed
PRESENTATION_NORMAL
= 'normal'
PRESENTATION_URL
public
final mixed
PRESENTATION_URL
= 'url'
Properties
$adapters
private
array<string|int, LinkRendererInterface>
$adapters
$destination
private
string
$destination
= ''
$documentationSet
private
DocumentationSetInterface
$documentationSet
$htmlFormatter
private
HtmlFormatter
$htmlFormatter
$project
private
ProjectInterface
$project
$router
private
Router
$router
Methods
__clone()
public
__clone() : mixed
__construct()
public
__construct(Router $router, HtmlFormatter $htmlFormatter) : mixed
Parameters
- $router : Router
- $htmlFormatter : HtmlFormatter
forDocumentationSet()
public
forDocumentationSet(DocumentationSetInterface $documentationSet) : self
Parameters
- $documentationSet : DocumentationSetInterface
Return values
selfgetDestination()
Returns the target directory relative to the Project's Root.
public
getDestination() : string
Return values
stringgetDocumentationSet()
public
getDocumentationSet() : DocumentationSetInterface
Return values
DocumentationSetInterfacegetProject()
public
getProject() : ProjectInterface
use getDocumentationSet()
Return values
ProjectInterfacerender()
public
render(array<string|int, Type>|Type|Descriptor|Fqsen|Reference|Path|string|iterable<string|int, mixed> $value, string $presentation) : string|array<int, string>
Parameters
- $value : array<string|int, Type>|Type|Descriptor|Fqsen|Reference|Path|string|iterable<string|int, mixed>
- $presentation : string
Return values
string|array<int, string>supports()
public
supports(mixed $value) : bool
Parameters
- $value : mixed
Return values
boolwithDestination()
Sets the destination directory relative to the Project's Root.
public
withDestination(string $destination) : self
The destination is the target directory containing the resulting file. This destination is relative to the Project's root and can be used for the calculation of nesting depths, etc.
For this specific extension the destination is provided in the Twig writer itself.
Parameters
- $destination : string
Return values
selfwithProject()
public
withProject(ProjectInterface $projectDescriptor) : self
will be removed once getProject is removed
Parameters
- $projectDescriptor : ProjectInterface
Return values
selfcreateAdapters()
private
createAdapters() : array<string|int, LinkRendererInterface>