Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
facets-3052574
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
facets-3052574
Commits
b7afb394
Commit
b7afb394
authored
3 years ago
by
Christophe Goffin
Browse files
Options
Downloads
Patches
Plain Diff
Also support Drupal 9.3+.
parent
6b339a91
Branches
3052574-facets-with-ajax
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Controller/FacetBlockAjaxController.php
+11
-2
11 additions, 2 deletions
src/Controller/FacetBlockAjaxController.php
with
11 additions
and
2 deletions
src/Controller/FacetBlockAjaxController.php
+
11
−
2
View file @
b7afb394
...
...
@@ -10,12 +10,13 @@ use Drupal\Core\Block\Plugin\Block\Broken;
use
Drupal\Core\Controller\ControllerBase
;
use
Drupal\Core\Path\CurrentPathStack
;
use
Drupal\Core\PathProcessor\PathProcessorManager
;
use
Drupal\Core\Http\RequestStack
as
DrupalRequestStack
;
use
Drupal\Core\Render\RendererInterface
;
use
Drupal\Core\Routing\CurrentRouteMatch
;
use
Drupal\facets\Plugin\Block\FacetBlock
;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
use
Symfony\Component\HttpFoundation\Request
;
use
Symfony\Component\HttpFoundation\RequestStack
;
use
Symfony\Component\HttpFoundation\RequestStack
as
SymfonyRequestStack
;
use
Symfony\Component\HttpKernel\Exception\NotFoundHttpException
;
use
Symfony\Component\Routing\RouterInterface
;
...
...
@@ -137,7 +138,15 @@ class FacetBlockAjaxController extends ControllerBase {
}
$new_request
=
Request
::
create
(
$path
);
$request_stack
=
new
RequestStack
();
// Support 9.3+
// @todo remove after 9.3 or greater is required.
if
(
class_exists
(
\Drupal\Core\Http\RequestStack
::
class
))
{
$request_stack
=
new
DrupalRequestStack
();
}
// Legacy request stack.
else
{
$request_stack
=
new
SymfonyRequestStack
();
}
$processed
=
$this
->
pathProcessor
->
processInbound
(
$path
,
$new_request
);
$this
->
currentPath
->
setPath
(
$processed
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment