Neos\Neos\Ui\Aspects\AugmentationAspect::editableElementAugmentation PHP Method

editableElementAugmentation() public method

Hooks into the editable viewhelper to render those attributes needed for the package's inline editing
public editableElementAugmentation ( TYPO3\FLOW\AOP\JoinPointInterface $joinPoint ) : mixed
$joinPoint TYPO3\FLOW\AOP\JoinPointInterface the join point
return mixed
    public function editableElementAugmentation(JoinPointInterface $joinPoint)
    {
        if (!$this->session->isStarted() || !$this->session->getData('__neosEnabled__')) {
            return $joinPoint->getAdviceChain()->proceed($joinPoint);
        }
        $property = $joinPoint->getMethodArgument('property');
        $node = $joinPoint->getMethodArgument('node');
        $content = $joinPoint->getAdviceChain()->proceed($joinPoint);
        $attributes = ['data-__neos-property' => $property];
        if ($node !== null) {
            $attributes += ['data-__neos-editable-node-contextpath' => $node->getContextPath()];
        }
        return $this->htmlAugmenter->addAttributes($content, $attributes, 'span');
    }