Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amazon_product_widget
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
amazon_product_widget
Commits
4da5d87c
Commit
4da5d87c
authored
1 year ago
by
Miha Wagner
Browse files
Options
Downloads
Patches
Plain Diff
Apply rector patch from issue
#3286060
.
parent
425700ff
Branches
1.0.x
Tags
1.0.1
1 merge request
!10
Drupal 10 compatibility
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
amazon_product_widget.post_update.php
+2
-2
2 additions, 2 deletions
amazon_product_widget.post_update.php
src/EventSubscriber/AmazonApiSubscriber.php
+6
-6
6 additions, 6 deletions
src/EventSubscriber/AmazonApiSubscriber.php
with
8 additions
and
8 deletions
amazon_product_widget.post_update.php
+
2
−
2
View file @
4da5d87c
...
...
@@ -13,7 +13,7 @@ use Drupal\menu_link_content\Entity\MenuLinkContent;
*/
function
amazon_product_widget_post_update_install_view
(
&
$sandbox
)
{
// Import the product overview view.
$configPath
=
d
rupal
_get_path
(
'module'
,
'amazon_product_widget'
)
.
'/config/install'
;
$configPath
=
\D
rupal
::
service
(
'extension.list.module'
)
->
getPath
(
'amazon_product_widget'
)
.
'/config/install'
;
$source
=
new
FileStorage
(
$configPath
);
/** @var \Drupal\Core\Config\StorageInterface $configStorage */
$configStorage
=
\Drupal
::
service
(
'config.storage'
);
...
...
@@ -43,7 +43,7 @@ function amazon_product_widget_post_update_install_view(&$sandbox) {
*/
function
amazon_product_widget_post_update_install_unavailable_products_view
(
&
$sandbox
)
{
// Import the product overview view.
$configPath
=
d
rupal
_get_path
(
'module'
,
'amazon_product_widget'
)
.
'/config/install'
;
$configPath
=
\D
rupal
::
service
(
'extension.list.module'
)
->
getPath
(
'amazon_product_widget'
)
.
'/config/install'
;
$source
=
new
FileStorage
(
$configPath
);
/** @var \Drupal\Core\Config\StorageInterface $configStorage */
$configStorage
=
\Drupal
::
service
(
'config.storage'
);
...
...
This diff is collapsed.
Click to expand it.
src/EventSubscriber/AmazonApiSubscriber.php
+
6
−
6
View file @
4da5d87c
...
...
@@ -2,12 +2,12 @@
namespace
Drupal\amazon_product_widget\EventSubscriber
;
use
Symfony\Component\HttpKernel\Event\RequestEvent
;
use
Symfony\Component\HttpKernel\Event\ResponseEvent
;
use
Drupal\Core\Cache\CacheableResponseInterface
;
use
Drupal\Core\Config\ImmutableConfig
;
use
Drupal\Core\Routing\RouteMatchInterface
;
use
Symfony\Component\EventDispatcher\EventSubscriberInterface
;
use
Symfony\Component\HttpKernel\Event\FilterResponseEvent
;
use
Symfony\Component\HttpKernel\Event\GetResponseEvent
;
use
Symfony\Component\HttpKernel\KernelEvents
;
/**
...
...
@@ -57,12 +57,12 @@ class AmazonApiSubscriber implements EventSubscriberInterface {
/**
* Unset cookie so the whole request acts as anonymous for everybody.
*
* @param \Symfony\Component\HttpKernel\Event\
GetResponse
Event $event
* @param \Symfony\Component\HttpKernel\Event\
Request
Event $event
* The event to process.
*
* @see \Drupal\Core\EventSubscriber\FinishResponseSubscriber::onRespond()
*/
public
function
onRequest
(
GetResponse
Event
$event
)
{
public
function
onRequest
(
Request
Event
$event
)
{
if
(
!
$event
->
isMasterRequest
())
{
return
;
}
...
...
@@ -83,12 +83,12 @@ class AmazonApiSubscriber implements EventSubscriberInterface {
/**
* Sets proper cache control header.
*
* @param \Symfony\Component\HttpKernel\Event\
Filter
ResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
* The event to process.
*
* @see \Drupal\Core\EventSubscriber\FinishResponseSubscriber::onRespond()
*/
public
function
onRespond
(
Filter
ResponseEvent
$event
)
{
public
function
onRespond
(
ResponseEvent
$event
)
{
if
(
!
$event
->
isMasterRequest
())
{
return
;
}
...
...
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