Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
redirect_node
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
redirect_node
Commits
15b01db7
Commit
15b01db7
authored
2 years ago
by
Rich Gerdes
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3289281
by Project Update Bot: Automated Drupal 10 compatibility fixes
parent
7ff45e24
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
redirect_node.info.yml
+1
-2
1 addition, 2 deletions
redirect_node.info.yml
src/EventSubscriber/RedirectRedirectNodes.php
+3
-3
3 additions, 3 deletions
src/EventSubscriber/RedirectRedirectNodes.php
with
4 additions
and
5 deletions
redirect_node.info.yml
+
1
−
2
View file @
15b01db7
name
:
Redirect Node
description
:
'
Provides
a
Drupal
Node
type
that
redirects
to
an
external
URL
with
viewed
directly.'
core
:
8.x
core_version_requirement
:
^8 || ^9
core_version_requirement
:
^8 || ^9 || ^10
type
:
module
dependencies
:
-
drupal:path
This diff is collapsed.
Click to expand it.
src/EventSubscriber/RedirectRedirectNodes.php
+
3
−
3
View file @
15b01db7
...
...
@@ -2,13 +2,13 @@
namespace
Drupal\redirect_node\EventSubscriber
;
use
Symfony\Component\HttpKernel\Event\RequestEvent
;
use
Drupal\Core\Entity\EntityTypeManagerInterface
;
use
Drupal\Core\Routing\TrustedRedirectResponse
;
use
Drupal\Core\Session\AccountProxy
;
use
Drupal\Core\Url
;
use
Drupal\node\NodeInterface
;
use
Symfony\Component\EventDispatcher\EventSubscriberInterface
;
use
Symfony\Component\HttpKernel\Event\GetResponseEvent
;
use
Symfony\Component\HttpKernel\KernelEvents
;
/**
...
...
@@ -63,10 +63,10 @@ class RedirectRedirectNodes implements EventSubscriberInterface {
/**
* Redirect requests for `redirect` nodes to their destination url.
*
* @param \Symfony\Component\HttpKernel\Event\
GetResponse
Event $event
* @param \Symfony\Component\HttpKernel\Event\
Request
Event $event
* Event object of current event.
*/
public
function
redirect
(
GetResponse
Event
$event
)
{
public
function
redirect
(
Request
Event
$event
)
{
$request
=
$event
->
getRequest
();
// This is necessary because this also gets called on
...
...
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