PHP Class Neos\Neos\Service\ContentElementWrappingService

Show file Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$htmlAugmenter HtmlAugmenter
$nodeAuthorizationService Neos\ContentRepository\Service\AuthorizationService
$nodePropertyConverterService Neos\Neos\Service\Mapping\NodePropertyConverterService
$privilegeManager Neos\Flow\Security\Authorization\PrivilegeManagerInterface

Public Methods

Method Description
wrapContentObject ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $content, string $typoScriptPath ) : string Wrap the $content identified by $node with the needed markup for the backend.
wrapCurrentDocumentMetadata ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $content, string $typoScriptPath ) : string

Protected Methods

Method Description
addCssClasses ( array $attributes, Neos\ContentRepository\Domain\Model\NodeInterface $node, array $initialClasses = [] ) : array Add required CSS classes to the attributes.
addDocumentMetadata ( array $attributes, Neos\ContentRepository\Domain\Model\NodeInterface $node ) : array Collects metadata for the Neos backend specifically for document nodes.
addGenericEditingMetadata ( array $attributes, Neos\ContentRepository\Domain\Model\NodeInterface $node ) : array Collects metadata attributes used to allow editing of the node in the Neos backend.
addNodePropertyAttributes ( array $attributes, Neos\ContentRepository\Domain\Model\NodeInterface $node ) : array Adds node properties to the given $attributes collection and returns the extended array
collectEditingClassNames ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : array Collects CSS class names used for styling editable elements in the Neos backend.
dasherize ( string $value ) : string Converts camelCased strings to lower cased and non-camel-cased strings
hasInlineEditableProperties ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : boolean Checks if the given Node has any properties configured as 'inlineEditable'
isInlineEditable ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : boolean Determine if the Node or one of it's properties is inline editable.
needsMetadata ( Neos\ContentRepository\Domain\Model\NodeInterface $node, boolean $renderCurrentDocumentMetadata ) : boolean
renderNodePropertyAttribute ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $propertyName ) : array Renders data attributes needed for the given node property.

Method Details

addCssClasses() protected method

Add required CSS classes to the attributes.
protected addCssClasses ( array $attributes, Neos\ContentRepository\Domain\Model\NodeInterface $node, array $initialClasses = [] ) : array
$attributes array
$node Neos\ContentRepository\Domain\Model\NodeInterface
$initialClasses array
return array

addDocumentMetadata() protected method

Collects metadata for the Neos backend specifically for document nodes.
protected addDocumentMetadata ( array $attributes, Neos\ContentRepository\Domain\Model\NodeInterface $node ) : array
$attributes array
$node Neos\ContentRepository\Domain\Model\NodeInterface
return array

addGenericEditingMetadata() protected method

Collects metadata attributes used to allow editing of the node in the Neos backend.
protected addGenericEditingMetadata ( array $attributes, Neos\ContentRepository\Domain\Model\NodeInterface $node ) : array
$attributes array
$node Neos\ContentRepository\Domain\Model\NodeInterface
return array

addNodePropertyAttributes() protected method

Adds node properties to the given $attributes collection and returns the extended array
protected addNodePropertyAttributes ( array $attributes, Neos\ContentRepository\Domain\Model\NodeInterface $node ) : array
$attributes array
$node Neos\ContentRepository\Domain\Model\NodeInterface
return array the merged attributes

collectEditingClassNames() protected method

Collects CSS class names used for styling editable elements in the Neos backend.
protected collectEditingClassNames ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : array
$node Neos\ContentRepository\Domain\Model\NodeInterface
return array

dasherize() protected method

Converts camelCased strings to lower cased and non-camel-cased strings
protected dasherize ( string $value ) : string
$value string
return string

hasInlineEditableProperties() protected method

Checks if the given Node has any properties configured as 'inlineEditable'
protected hasInlineEditableProperties ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : boolean
$node Neos\ContentRepository\Domain\Model\NodeInterface
return boolean

isInlineEditable() protected method

$parsedType = TypeHandling::parseType($dataType);
protected isInlineEditable ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : boolean
$node Neos\ContentRepository\Domain\Model\NodeInterface
return boolean

needsMetadata() protected method

protected needsMetadata ( Neos\ContentRepository\Domain\Model\NodeInterface $node, boolean $renderCurrentDocumentMetadata ) : boolean
$node Neos\ContentRepository\Domain\Model\NodeInterface
$renderCurrentDocumentMetadata boolean
return boolean

renderNodePropertyAttribute() protected method

Renders data attributes needed for the given node property.
protected renderNodePropertyAttribute ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $propertyName ) : array
$node Neos\ContentRepository\Domain\Model\NodeInterface
$propertyName string
return array

wrapContentObject() public method

Wrap the $content identified by $node with the needed markup for the backend.
public wrapContentObject ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $content, string $typoScriptPath ) : string
$node Neos\ContentRepository\Domain\Model\NodeInterface
$content string
$typoScriptPath string
return string

wrapCurrentDocumentMetadata() public method

public wrapCurrentDocumentMetadata ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $content, string $typoScriptPath ) : string
$node Neos\ContentRepository\Domain\Model\NodeInterface
$content string
$typoScriptPath string
return string

Property Details

$htmlAugmenter protected property

protected HtmlAugmenter,Neos\Neos\Service $htmlAugmenter
return HtmlAugmenter

$nodeAuthorizationService protected property

protected AuthorizationService,Neos\ContentRepository\Service $nodeAuthorizationService
return Neos\ContentRepository\Service\AuthorizationService

$nodePropertyConverterService protected property

protected NodePropertyConverterService,Neos\Neos\Service\Mapping $nodePropertyConverterService
return Neos\Neos\Service\Mapping\NodePropertyConverterService

$privilegeManager protected property

protected PrivilegeManagerInterface,Neos\Flow\Security\Authorization $privilegeManager
return Neos\Flow\Security\Authorization\PrivilegeManagerInterface