/**
  * Construct ajax call for loaders.
  *
  * @return string
  */
 protected function constructAjaxCall()
 {
     $queryParams = ['id' => WidgetId::get(), 'name' => $this->widgetFactory->widgetName, 'params' => $this->widgetFactory->encryptWidgetParams($this->widgetFactory->widgetFullParams)];
     $url = $this->ajaxLink . '?' . http_build_query($queryParams);
     return $this->useJquery() ? $this->constructJqueryAjaxCall($url) : $this->constructNativeJsAjaxCall($url);
 }
 /**
  * Set some specials variables to modify the workflow of the widget factory.
  *
  * @param Request $request
  */
 protected function prepareGlobals(Request $request)
 {
     WidgetId::set($request->input('id', 1) - 1);
     AbstractWidgetFactory::$skipWidgetContainer = true;
 }