class EditableViewHelper extends AbstractTagBasedViewHelper (View source)

Renders a wrapper around the inner contents of the tag to enable frontend editing.

The wrapper contains the property name which should be made editable, and is by default a "div" tag. The tag to use can be given as tag argument to the ViewHelper.

In live workspace this just renders a tag with the specified $tag-name containing the value of the given $property. For logged in users with access to the Backend this also adds required attributes for the RTE to work.

Note: when passing a node you have to make sure a metadata wrapper is used around this that matches the given node (see contentElement.wrap - i.e. the WrapViewHelper).

Traits

This trait is to be used in ViewHelpers that need to get information from the Fusion runtime context.

Properties

protected PrivilegeManagerInterface $privilegeManager
protected ContentElementEditableService $contentElementEditableService

Methods

mixed
getContextVariable(string $variableName)

Get a variable value from the Fusion runtime context.

bool
hasContextVariable(string $variableName)

No description

void
initializeArguments()

No description

string
render()

In live workspace this just renders a tag; for logged in users with access to the Backend this also adds required attributes for the editing.

Node
getNodeFromFusionContext()

No description

Details

protected mixed getContextVariable(string $variableName)

Get a variable value from the Fusion runtime context.

Note: This will return NULL if the variable didn't exist.

Parameters

string $variableName

Return Value

mixed

See also

hasContextVariable()

protected bool hasContextVariable(string $variableName)

No description

Parameters

string $variableName

Return Value

bool

void initializeArguments()

No description

Return Value

void

string render()

In live workspace this just renders a tag; for logged in users with access to the Backend this also adds required attributes for the editing.

Return Value

string

The rendered property with a wrapping tag. In the user workspace this adds some required attributes for the RTE to work

Exceptions

Exception

protected Node getNodeFromFusionContext()

No description

Return Value

Node

Exceptions

Exception