public function reverseTransform($value): ?User
    {
        if (empty($value)) {
            return null;
        }

        if (!is_numeric($value)) {
            throw new TransformationFailedException('Expected a numeric string.');
        }

        try {
            return $this->userService->loadUser($value);
        } catch (NotFoundException $e) {
            throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
        }
    }
public function reverseTransform($value): ?User
    {
        if (empty($value)) {
            return null;
        }

        if (!is_numeric($value)) {
            throw new TransformationFailedException('Expected a numeric string.');
        }

        try {
            return $this->userService->loadUser($value);
        } catch (NotFoundException $e) {
            throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
        }
    }
public function reverseTransform ( $ value ) : ? User { if ( empty ( $ value ) ) { return null ; } if ( ! is_numeric ( $ value ) ) { throw new TransformationFailedException ( 'Expected a numeric string.' ) ; } try { return $ this -> userService -> loadUser ( $ value ) ; } catch ( NotFoundException $ e ) { throw new TransformationFailedException ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e ) ; } }
Transforms a Users's ID integer into a domain specific User object.

@param mixed|null $value

@return \eZ\Publish\API\Repository\Values\User\User|null

@throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException
@throws \Symfony\Component\Form\Exception\TransformationFailedException if the given value is not an integer
or if the value can not be transformed
Transforms a Users s ID integer into a domain specific User object .