Neos\Flow\Aop\JoinPointInterface::getResult PHP Method

getResult() public method

Returns the result of the method invocation. The result is only available for AfterReturning advices.
public getResult ( ) : mixed
return mixed Result of the method invocation
    public function getResult();

Usage Example

 /**
  * Logs calls and result of isPrivilegeTargetGranted()
  *
  * @Flow\After("method(Neos\Flow\Security\Authorization\PrivilegeManager->isPrivilegeTargetGranted())")
  * @param JoinPointInterface $joinPoint
  * @return void
  */
 public function logPrivilegeAccessDecisions(JoinPointInterface $joinPoint)
 {
     $decision = $joinPoint->getResult() === true ? 'GRANTED' : 'DENIED';
     $message = sprintf('Decided "%s" on privilege "%s".', $decision, $joinPoint->getMethodArgument('privilegeTargetIdentifier'));
     $this->securityLogger->log($message, \LOG_INFO);
 }
All Usage Examples Of Neos\Flow\Aop\JoinPointInterface::getResult