src/Graviton/RestBundle/Restriction/Handler/Whoami.php
public function getValue(DocumentRepository $repository, $fieldPath)
    {
        $user = 'anonymous';

        $securityUser = $this->securityUtils->getSecurityUser();
        if ($securityUser instanceof SecurityUser) {
            $user = trim(strtolower($securityUser->getUsername()));
        }

        return $user;
    }
public function getValue(DocumentRepository $repository, $fieldPath)
    {
        $user = 'anonymous';

        $securityUser = $this->securityUtils->getSecurityUser();
        if ($securityUser instanceof SecurityUser) {
            $user = trim(strtolower($securityUser->getUsername()));
        }

        return $user;
    }
public function getValue ( DocumentRepository $ repository , $ fieldPath ) { $ user = 'anonymous' ; $ securityUser = $ this -> securityUtils -> getSecurityUser ( ) ; if ( $ securityUser instanceof SecurityUser ) { $ user = trim ( strtolower ( $ securityUser -> getUsername ( ) ) ) ; } return $ user ; }
gets the actual value or an AbstractQueryNode that is used to filter the data.

@param DocumentRepository $repository the repository
@param string             $fieldPath  field path

@return string|AbstractQueryNode string for eq() filtering or a AbstractQueryNode instance
gets the actual value or an AbstractQueryNode that is used to filter the data .