diff --git a/core/modules/views/lib/Drupal/views/Controller/ViewAjaxController.php b/core/modules/views/lib/Drupal/views/Controller/ViewAjaxController.php index 6f7c093..e03a4e8 100644 --- a/core/modules/views/lib/Drupal/views/Controller/ViewAjaxController.php +++ b/core/modules/views/lib/Drupal/views/Controller/ViewAjaxController.php @@ -7,8 +7,9 @@ namespace Drupal\views\Controller; +use Drupal\Component\Utility\Url; use Drupal\Core\Ajax\ReplaceCommand; -use Drupal\Core\ControllerInterface; +use Drupal\Core\Controller\ControllerInterface; use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\views\Ajax\ScrollTopCommand; use Drupal\views\Ajax\ViewAjaxResponse; @@ -53,7 +54,10 @@ public function __construct(EntityStorageControllerInterface $storage_controller * {@inheritdoc} */ public static function create(ContainerInterface $container) { - return new static($container->get('plugin.manager.entity')->getStorageController('view'), $container->get('views.executable')); + return new static( + $container->get('plugin.manager.entity')->getStorageController('view'), + $container->get('views.executable') + ); } /** @@ -61,6 +65,12 @@ public static function create(ContainerInterface $container) { * * @param \Symfony\Component\HttpFoundation\Request $request * The current request object. + * + * @return \Drupal\views\Ajax\ViewAjaxResponse + * The view response as ajax response. + * + * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException + * Thrown when the view was not found. */ public function ajaxView(Request $request) { $name = $request->request->get('view_name'); @@ -108,7 +118,7 @@ public function ajaxView(Request $request) { // Overwrite the destination. // @see drupal_get_destination() $origin_destination = $path; - $query = drupal_http_build_query($request->query->all()); + $query = Url::buildQuery($request->query->all()); if ($query != '') { $origin_destination .= '?' . $query; }