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

        try {
            $this->database->deleteImageVariations($user, $imageIdentifier);
        } catch (DatabaseException $e) {
            trigger_error(sprintf('Could not delete image variation metadata for %s (%s)', $user, $imageIdentifier), E_USER_WARNING);
        }

        try {
            $this->storage->deleteImageVariations($user, $imageIdentifier);
        } catch (StorageException $e) {
            trigger_error(sprintf('Could not delete image variations from storage for %s (%s)', $user, $imageIdentifier), E_USER_WARNING);
        }
    }
public function deleteVariations(EventInterface $event) {
        $request = $event->getRequest();
        $user = $request->getUser();
        $imageIdentifier = $request->getImageIdentifier();

        try {
            $this->database->deleteImageVariations($user, $imageIdentifier);
        } catch (DatabaseException $e) {
            trigger_error(sprintf('Could not delete image variation metadata for %s (%s)', $user, $imageIdentifier), E_USER_WARNING);
        }

        try {
            $this->storage->deleteImageVariations($user, $imageIdentifier);
        } catch (StorageException $e) {
            trigger_error(sprintf('Could not delete image variations from storage for %s (%s)', $user, $imageIdentifier), E_USER_WARNING);
        }
    }
public function deleteVariations ( EventInterface $ event ) { $ request = $ event -> getRequest ( ) ; $ user = $ request -> getUser ( ) ; $ imageIdentifier = $ request -> getImageIdentifier ( ) ; try { $ this -> database -> deleteImageVariations ( $ user , $ imageIdentifier ) ; } catch ( DatabaseException $ e ) { trigger_error ( sprintf ( 'Could not delete image variation metadata for %s (%s)' , $ user , $ imageIdentifier ) , E_USER_WARNING ) ; } try { $ this -> storage -> deleteImageVariations ( $ user , $ imageIdentifier ) ; } catch ( StorageException $ e ) { trigger_error ( sprintf ( 'Could not delete image variations from storage for %s (%s)' , $ user , $ imageIdentifier ) , E_USER_WARNING ) ; } }
Delete all image variations attached to an image

If any of the delete operations fail Imbo will trigger an error

@param EventInterface $event The current event
Delete all image variations attached to an image