ConvertUrisImplementation
class ConvertUrisImplementation extends AbstractFusionObject (View source)
A Fusion Object that converts link references in the format "
Right now node://
Usage::
someTextProperty.@process.1 = Neos.Neos:ConvertUris
The optional property forceConversion
can be used to have the links converted even when not
rendering the live workspace. This is used for links that are not inline editable (for
example links on images)::
someTextProperty.@process.1 = Neos.Neos:ConvertUris { forceConversion = true }
The optional property externalLinkTarget
can be modified to disable or change the target attribute of the
link tag for links to external targets::
prototype(Neos.Neos:ConvertUris) { externalLinkTarget = '_blank' resourceLinkTarget = '_blank' }
The optional property absolute
can be used to convert node uris to absolute links::
someTextProperty.@process.1 = Neos.Neos:ConvertUris { absolute = true }
Properties
protected Runtime | $runtime | from AbstractFusionObject | |
protected string | $path | The Fusion path currently being rendered |
from AbstractFusionObject |
protected string | $fusionObjectName | Name of this Fusion object, like Neos.Neos:Text |
from AbstractFusionObject |
protected array | $fusionValueCache | from AbstractFusionObject | |
protected LinkingService | $linkingService |
Methods
Convert URIs matching a supported scheme with generated URIs
Return the Fusion value relative to this Fusion object (with processors etc applied).
Dummy implementation of ArrayAccess to allow this.XXX access in processors.
Dummy implementation of ArrayAccess to allow this.XXX access in processors.
Dummy implementation of ArrayAccess to allow this.XXX access in processors.
Dummy implementation of ArrayAccess to allow this.XXX access in processors.
Replace the target attribute of link tags in processedContent with the target specified by externalLinkTarget and resourceLinkTarget options.
Details
__construct(Runtime $runtime, string $path, string $fusionObjectName)
Constructor
mixed
evaluate()
Convert URIs matching a supported scheme with generated URIs
If the workspace of the current node context is not live, no replacement will be done unless forceConversion is set. This is needed to show the editable links with metadata in the content module.
Runtime
getRuntime()
Get the Fusion runtime this object was created in.
protected mixed
fusionValue(string $path)
Return the Fusion value relative to this Fusion object (with processors etc applied).
Note that subsequent calls of fusionValue() with the same Fusion path will return the same values since the first evaluated value will be cached in memory.
bool
offsetExists(mixed $offset)
Dummy implementation of ArrayAccess to allow this.XXX access in processors.
mixed
offsetGet(mixed $offset)
Dummy implementation of ArrayAccess to allow this.XXX access in processors.
void
offsetSet(mixed $offset, mixed $value)
Dummy implementation of ArrayAccess to allow this.XXX access in processors.
void
offsetUnset(mixed $offset)
Dummy implementation of ArrayAccess to allow this.XXX access in processors.
protected string
replaceLinkTargets(string $processedContent)
Replace the target attribute of link tags in processedContent with the target specified by externalLinkTarget and resourceLinkTarget options.
Additionally set rel="noopener" for external links.