final class NodeUriBuilder (View source)

Builds URIs to nodes, taking workspace (live / shared / user) into account.

This class can also be used in order to render "preview" URLs to nodes that are not in the live workspace (in the Neos Backend and shared workspaces)

Methods

__construct(UriBuilder $uriBuilder)

No description

static NodeUriBuilder
fromRequest(ActionRequest $request)

No description

static NodeUriBuilder
fromUriBuilder(UriBuilder $uriBuilder)

No description

UriInterface
uriFor(NodeAddress $nodeAddress)

Renders an URI for the given $nodeAddress If the node belongs to the live workspace, the public URL is generated Otherwise a preview URI is rendered (previewUriFor())

UriInterface
previewUriFor(NodeAddress $nodeAddress)

Renders a stable "preview" URI for the given $nodeAddress A preview URI is used to display a node that is not public yet (i.e. not in a live workspace).

Details

protected __construct(UriBuilder $uriBuilder)

No description

Parameters

UriBuilder $uriBuilder

static NodeUriBuilder fromRequest(ActionRequest $request)

No description

Parameters

ActionRequest $request

Return Value

NodeUriBuilder

static NodeUriBuilder fromUriBuilder(UriBuilder $uriBuilder)

No description

Parameters

UriBuilder $uriBuilder

Return Value

NodeUriBuilder

UriInterface uriFor(NodeAddress $nodeAddress)

Renders an URI for the given $nodeAddress If the node belongs to the live workspace, the public URL is generated Otherwise a preview URI is rendered (previewUriFor())

Note: Shortcut nodes will are resolved in the RoutePartHandler thus the resulting URI will point to the shortcut target (node, asset or external URI)

Parameters

NodeAddress $nodeAddress

Return Value

UriInterface

Exceptions

NoMatchingRouteException

| MissingActionNameException | HttpException

UriInterface previewUriFor(NodeAddress $nodeAddress)

Renders a stable "preview" URI for the given $nodeAddress A preview URI is used to display a node that is not public yet (i.e. not in a live workspace).

Parameters

NodeAddress $nodeAddress

Return Value

UriInterface

Exceptions

NoMatchingRouteException

| MissingActionNameException | HttpException