EditableViewHelper
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
Get a variable value from the Fusion runtime context.
No description
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.
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.
protected 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.
protected Node
getNodeFromFusionContext()
No description