public function deleteBookmark(Request $request, int $locationId): RestValue
    {
        $location = $this->locationService->loadLocation($locationId);

        try {
            $this->bookmarkService->deleteBookmark($location);

            return new Values\NoContent();
        } catch (InvalidArgumentException $e) {
            throw new Exceptions\NotFoundException("Location {$locationId} is not bookmarked");
        }
    }
public function deleteBookmark(Request $request, int $locationId): RestValue
    {
        $location = $this->locationService->loadLocation($locationId);

        try {
            $this->bookmarkService->deleteBookmark($location);

            return new Values\NoContent();
        } catch (InvalidArgumentException $e) {
            throw new Exceptions\NotFoundException("Location {$locationId} is not bookmarked");
        }
    }
public function deleteBookmark ( Request $ request , int $ locationId ) : RestValue { $ location = $ this -> locationService -> loadLocation ( $ locationId ) ; try { $ this -> bookmarkService -> deleteBookmark ( $ location ) ; return new Values \ NoContent ( ) ; } catch ( InvalidArgumentException $ e ) { throw new Exceptions \ NotFoundException ( "Location {$locationId} is not bookmarked" ) ; } }
Deletes a given bookmark.

@param \Symfony\Component\HttpFoundation\Request $request
@param int $locationId

@throws \eZ\Publish\API\Repository\Exceptions\NotFoundException
@throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException

@return \eZ\Publish\Core\REST\Common\Value
Deletes a given bookmark .