public convertNodeToContextPathForRouting ( Neos\Flow\Aop\JoinPointInterface $joinPoint ) : string | array | ||
$joinPoint | Neos\Flow\Aop\JoinPointInterface | the joinpoint |
return | string | array | the context path to be used for routing |
public function convertNodeToContextPathForRouting(JoinPointInterface $joinPoint)
{
$objectArgument = $joinPoint->getMethodArgument('object');
if ($objectArgument instanceof NodeInterface) {
return $objectArgument->getContextPath();
} else {
return $joinPoint->getAdviceChain()->proceed($joinPoint);
}
}