class ContentElementWrappingService (View source)

The content element wrapping service adds the necessary markup around a content element such that it can be edited using the Content Module of the Neos Backend.

Properties

protected PrivilegeManagerInterface $privilegeManager
protected AuthorizationService $nodeAuthorizationService
protected HtmlAugmenter $htmlAugmenter

Methods

string
wrapContentObject(NodeInterface $node, string $content, string $fusionPath, array $additionalAttributes = [])

This is an extensibility point for other packages to add additional attributes to the wrapping tag.

string
wrapCurrentDocumentMetadata(NodeInterface $node, string $content, string $fusionPath, array $additionalAttributes = [])

No description

array
addCssClasses(array $attributes, NodeInterface $node, array $initialClasses = [])

Add required CSS classes to the attributes.

array
collectEditingClassNames(NodeInterface $node)

Collects CSS class names used for styling editable elements in the Neos backend.

bool
isInlineEditable(NodeInterface $node)

Determine if the Node or one of it's properties is inline editable.

bool
hasInlineEditableProperties(NodeInterface $node)

Checks if the given Node has any properties configured as 'inlineEditable'

bool
needsMetadata(NodeInterface $node, bool $renderCurrentDocumentMetadata)

No description

Details

string wrapContentObject(NodeInterface $node, string $content, string $fusionPath, array $additionalAttributes = [])

This is an extensibility point for other packages to add additional attributes to the wrapping tag.

This method is replaced by the Neos.Ui package via an aspect to add the needed markup for selection.

Parameters

NodeInterface $node
string $content
string $fusionPath
array $additionalAttributes

additional attributes in the form ['' => '', ...] to be rendered in the element wrapping

Return Value

string

string wrapCurrentDocumentMetadata(NodeInterface $node, string $content, string $fusionPath, array $additionalAttributes = [])

No description

Parameters

NodeInterface $node
string $content
string $fusionPath
array $additionalAttributes

additional attributes in the form ['' => '', ...] to be rendered in the element wrapping

Return Value

string

protected array addCssClasses(array $attributes, NodeInterface $node, array $initialClasses = [])

Add required CSS classes to the attributes.

Parameters

array $attributes
NodeInterface $node
array $initialClasses

Return Value

array

protected array collectEditingClassNames(NodeInterface $node)

Collects CSS class names used for styling editable elements in the Neos backend.

Parameters

NodeInterface $node

Return Value

array

protected bool isInlineEditable(NodeInterface $node)

Determine if the Node or one of it's properties is inline editable.

$parsedType = TypeHandling::parseType($dataType);

Parameters

NodeInterface $node

Return Value

bool

protected bool hasInlineEditableProperties(NodeInterface $node)

Checks if the given Node has any properties configured as 'inlineEditable'

Parameters

NodeInterface $node

Return Value

bool

protected bool needsMetadata(NodeInterface $node, bool $renderCurrentDocumentMetadata)

No description

Parameters

NodeInterface $node
bool $renderCurrentDocumentMetadata

Return Value

bool