public function deleteAction(Widget $widget, $viewReference)
    {
        $view = $this->getViewByReferenceId($viewReference);

        try {
            $widgetId = $widget->getId();
            $this->get('widget_manager')->deleteWidget($widget, $view);

            return new JsonResponse([
                    'success'  => true,
                    'message'  => $this->get('translator')->trans('victoire_widget.delete.success', [], 'victoire'),
                    'widgetId' => $widgetId,
                ]
            );
        } catch (Exception $ex) {
            return $this->getJsonReponseFromException($ex);
        }
    }