public function apiWidgetsAction($widgetIds, $viewReferenceId)
    {
        $view = $this->get('victoire_page.page_helper')->findPageByParameters(['id' => $viewReferenceId]);
        $response = [];
        $widgets = $this->get('doctrine.orm.entity_manager')->getRepository('VictoireWidgetBundle:Widget')
            ->findBy(['id' => json_decode($widgetIds)]);

        foreach ($widgets as $widget) {
            $response[$widget->getId()] = $this->get('victoire_widget.widget_renderer')->render($widget, $view);
        }

        return new JsonResponse($response);
    }