/**
* Wrap the $content identified by $node with the needed markup for the backend.
*
* @param NodeInterface $node
* @param string $property
* @param string $content
* @return string
*/
public function wrapContentProperty(NodeInterface $node, $property, $content)
{
/** @var $contentContext ContentContext */
$contentContext = $node->getContext();
if ($contentContext->getWorkspaceName() === 'live' || !$this->privilegeManager->isPrivilegeTargetGranted('Neos.Neos:Backend.GeneralAccess')) {
return $content;
}
if (!$this->nodeAuthorizationService->isGrantedToEditNode($node)) {
return $content;
}
$attributes = array();
$attributes['class'] = 'neos-inline-editable';
$attributes['property'] = 'typo3:' . $property;
$attributes['data-neos-node-type'] = $node->getNodeType()->getName();
return $this->htmlAugmenter->addAttributes($content, $attributes, 'span');
}