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

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

        try {
            return $this->roleService->loadRole($value);
        } catch (NotFoundException $e) {
            throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
        }
    }
public function reverseTransform ( $ value ) : ? APIRole { if ( empty ( $ value ) ) { return null ; } try { return $ this -> roleService -> loadRole ( $ value ) ; } catch ( NotFoundException $ e ) { throw new TransformationFailedException ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e ) ; } }
Transforms a Role identifier into a domain specific Role object.

@param mixed $value

@return APIRole|null

@throws UnauthorizedException
@throws TransformationFailedException
Transforms a Role identifier into a domain specific Role object .