LinkRenderer
in package
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 = 'class:short'
- PRESENTATION_FILE_SHORT = 'file:short'
- PRESENTATION_NONE = ''
- PRESENTATION_NORMAL = 'normal'
- PRESENTATION_URL = 'url'
Properties
- $adapters : array<string|int, LinkRendererInterface>
- $destination : string
- $documentationSet : DocumentationSetDescriptor
- $htmlFormatter : HtmlFormatter
- $project : ProjectDescriptor
- $router : Router
Methods
- __clone() : mixed
- __construct() : mixed
- forDocumentationSet() : self
- getDestination() : string
- Returns the target directory relative to the Project's Root.
- getDocumentationSet() : DocumentationSetDescriptor
- getProject() : ProjectDescriptor
- 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
DocumentationSetDescriptor
$documentationSet
$htmlFormatter
private
HtmlFormatter
$htmlFormatter
$project
private
ProjectDescriptor
$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(DocumentationSetDescriptor $documentationSet) : self
Parameters
- $documentationSet : DocumentationSetDescriptor
Return values
selfgetDestination()
Returns the target directory relative to the Project's Root.
public
getDestination() : string
Return values
stringgetDocumentationSet()
public
getDocumentationSet() : DocumentationSetDescriptor
Return values
DocumentationSetDescriptorgetProject()
public
getProject() : ProjectDescriptor
use getDocumentationSet()
Return values
ProjectDescriptorrender()
public
render(array<string|int, Type>|Type|DescriptorAbstract|Fqsen|Reference|Path|string|iterable<string|int, mixed> $value, string $presentation) : string|array<int, string>
Parameters
- $value : array<string|int, Type>|Type|DescriptorAbstract|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(ProjectDescriptor $projectDescriptor) : self
will be removed once getProject is removed
Parameters
- $projectDescriptor : ProjectDescriptor
Return values
selfcreateAdapters()
private
createAdapters() : array<string|int, LinkRendererInterface>