Mercurial > hg > cmmr2012-drupal-site
diff core/modules/views/views.theme.inc @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
line wrap: on
line diff
--- a/core/modules/views/views.theme.inc Thu Feb 28 13:11:55 2019 +0000 +++ b/core/modules/views/views.theme.inc Thu May 09 15:34:47 2019 +0100 @@ -9,6 +9,7 @@ use Drupal\Component\Utility\Xss; use Drupal\Core\Template\Attribute; use Drupal\Core\Url; +use Drupal\Core\Utility\TableSort; /** * Prepares variables for view templates. @@ -260,11 +261,11 @@ $active_urls = [ // Force system path. - \Drupal::url('<current>', [], ['alias' => TRUE]), + Url::fromRoute('<current>', [], ['alias' => TRUE])->toString(), // Force system path. Url::fromRouteMatch(\Drupal::routeMatch())->setOption('alias', TRUE)->toString(), // Could be an alias. - \Drupal::url('<current>'), + Url::fromRoute('<current>')->toString(), // Could be an alias. Url::fromRouteMatch(\Drupal::routeMatch())->toString(), ]; @@ -349,9 +350,9 @@ $count = 0; $active_urls = [ // Force system path. - \Drupal::url('<current>', [], ['alias' => TRUE]), + Url::fromRoute('<current>', [], ['alias' => TRUE])->toString(), // Could be an alias. - \Drupal::url('<current>'), + Url::fromRoute('<current>')->toString(), ]; $active_urls = array_combine($active_urls, $active_urls); @@ -449,7 +450,7 @@ // working URLs. $route_name = !empty($view->live_preview) ? '<current>' : '<none>'; - $query = tablesort_get_query_parameters(); + $query = TableSort::getQueryParameters(\Drupal::request()); if (isset($view->exposed_raw_input)) { $query += $view->exposed_raw_input; } @@ -1037,7 +1038,7 @@ $options = [ 'query' => pager_query_add_page($parameters, $element, $pager_page_array[$element] - 1), ]; - $variables['items']['previous']['href'] = \Drupal::url('<current>', [], $options); + $variables['items']['previous']['href'] = Url::fromRoute('<current>', [], $options)->toString(); if (isset($tags[1])) { $variables['items']['previous']['text'] = $tags[1]; } @@ -1048,7 +1049,7 @@ $options = [ 'query' => pager_query_add_page($parameters, $element, $pager_page_array[$element] + 1), ]; - $variables['items']['next']['href'] = \Drupal::url('<current>', [], $options); + $variables['items']['next']['href'] = Url::fromRoute('<current>', [], $options)->toString(); if (isset($tags[3])) { $variables['items']['next']['text'] = $tags[3]; }