public function deleteImageShortUrls(EventInterface $event) {
        $request = $event->getRequest();
        $user = $request->getUser();
        $imageIdentifier = $request->getImageIdentifier();

        $event->getDatabase()->deleteShortUrls(
            $user,
            $imageIdentifier
        );

        if ($event->getName() === 'shorturls.delete') {
            // If the request is against the shorturls resource directly we need to supply a
            // response model. If this method is triggered because of an image has been deleted
            // the image resource will supply the response model
            $model = new ArrayModel();
            $model->setData([
                'imageIdentifier' => $imageIdentifier,
            ]);

            $event->getResponse()->setModel($model);
        }
    }