public contentElementAugmentation ( TYPO3\FLOW\AOP\JoinPointInterface $joinPoint ) : mixed | ||
$joinPoint | TYPO3\FLOW\AOP\JoinPointInterface | the join point |
return | mixed |
public function contentElementAugmentation(JoinPointInterface $joinPoint)
{
if (!$this->session->isStarted() || !$this->session->getData('__neosEnabled__')) {
return $joinPoint->getAdviceChain()->proceed($joinPoint);
}
$node = $joinPoint->getMethodArgument('node');
$content = $joinPoint->getMethodArgument('content');
$typoScriptPath = $joinPoint->getMethodArgument('typoScriptPath');
$attributes = ['data-__neos-node-contextpath' => $node->getContextPath(), 'data-__neos-typoscript-path' => $typoScriptPath];
return $this->htmlAugmenter->addAttributes($content, $attributes, 'div');
}