class InPreviewModeViewHelper extends AbstractRenderingStateViewHelper (View source)

ViewHelper to find out if Neos is rendering a preview mode.

= Examples =

Given we are currently in a preview mode:

Shown in preview. Shown elsewhere (edit mode or not in backend). ``` Shown in preview. Given we are in the preview mode named "desktop" Shown just for print preview mode. Shown in all other cases. ``` Shown in all other cases.

Properties

protected PrivilegeManager $privilegeManager from  AbstractRenderingStateViewHelper
protected ContentRepositoryRegistry $contentRepositoryRegistry from  AbstractRenderingStateViewHelper

Methods

NodeAddress
getNodeAddressOfContextNode(Node|null $node)

Get a node from the current Fusion context if available.

void
initializeArguments()

Initialize the arguments.

bool
render(Node $node = null, string $mode = null)

No description

Details

protected NodeAddress getNodeAddressOfContextNode(Node|null $node)

Get a node from the current Fusion context if available.

Parameters

Node|null $node

Return Value

NodeAddress

Exceptions

Exception

protected bool hasAccessToBackend()

No description

Return Value

bool

void initializeArguments()

Initialize the arguments.

Return Value

void

Exceptions

Exception

bool render(Node $node = null, string $mode = null)

No description

Parameters

Node $node
string $mode

Return Value

bool