Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
photoswipe-3301516
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
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
photoswipe-3301516
Commits
2020afb3
Commit
2020afb3
authored
11 months ago
by
Joshua Sedler
Browse files
Options
Downloads
Patches
Plain Diff
Fix issue
parent
5c631b25
No related branches found
Branches containing commit
Tags
8.x-1.19
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/photoswipe_dynamic_caption/src/Form/PhotoswipeDynamicCaptionSettings.php
+9
-5
9 additions, 5 deletions
...mic_caption/src/Form/PhotoswipeDynamicCaptionSettings.php
src/Form/PhotoswipeSettings.php
+9
-5
9 additions, 5 deletions
src/Form/PhotoswipeSettings.php
with
18 additions
and
10 deletions
modules/photoswipe_dynamic_caption/src/Form/PhotoswipeDynamicCaptionSettings.php
+
9
−
5
View file @
2020afb3
...
...
@@ -23,7 +23,7 @@ class PhotoswipeDynamicCaptionSettings extends ConfigFormBase {
/**
* The dynamic page cache.
*
* @var \Drupal\Core\Cache\CacheBackendInterface
* @var \Drupal\Core\Cache\CacheBackendInterface
|null
*/
protected
$dynamicPageCache
;
...
...
@@ -34,10 +34,10 @@ class PhotoswipeDynamicCaptionSettings extends ConfigFormBase {
* The factory for configuration objects.
* @param \Drupal\Core\Cache\CacheBackendInterface $render_cache
* Constructor.
* @param \Drupal\Core\Cache\CacheBackendInterface $dynamic_page_cache
* @param \Drupal\Core\Cache\CacheBackendInterface
|null
$dynamic_page_cache
* The captcha service.
*/
public
function
__construct
(
ConfigFactoryInterface
$config_factory
,
CacheBackendInterface
$render_cache
,
CacheBackendInterface
$dynamic_page_cache
)
{
public
function
__construct
(
ConfigFactoryInterface
$config_factory
,
CacheBackendInterface
$render_cache
,
?
CacheBackendInterface
$dynamic_page_cache
)
{
parent
::
__construct
(
$config_factory
);
$this
->
renderCache
=
$render_cache
;
$this
->
dynamicPageCache
=
$dynamic_page_cache
;
...
...
@@ -50,7 +50,7 @@ class PhotoswipeDynamicCaptionSettings extends ConfigFormBase {
return
new
static
(
$container
->
get
(
'config.factory'
),
$container
->
get
(
'cache.render'
),
$container
->
get
(
'cache.dynamic_page_cache'
)
$container
->
has
(
'cache.dynamic_page_cache'
)
?
$container
->
get
(
'cache.dynamic_page_cache'
)
:
NULL
,
);
}
...
...
@@ -136,7 +136,11 @@ class PhotoswipeDynamicCaptionSettings extends ConfigFormBase {
// @todo This can probably be more fine graded in the future:
$this
->
renderCache
->
invalidateAll
();
$this
->
dynamicPageCache
->
invalidateAll
();
// If the "Internal Dynamic Page Cache" module isn't installed, the
// dynamicPageCache variable will be NULL:
if
(
$this
->
dynamicPageCache
!==
NULL
)
{
$this
->
dynamicPageCache
->
invalidateAll
();
}
}
/**
...
...
This diff is collapsed.
Click to expand it.
src/Form/PhotoswipeSettings.php
+
9
−
5
View file @
2020afb3
...
...
@@ -24,7 +24,7 @@ class PhotoswipeSettings extends ConfigFormBase {
/**
* The dynamic page cache.
*
* @var \Drupal\Core\Cache\CacheBackendInterface
* @var \Drupal\Core\Cache\CacheBackendInterface
|null
*/
protected
$dynamicPageCache
;
...
...
@@ -35,10 +35,10 @@ class PhotoswipeSettings extends ConfigFormBase {
* The factory for configuration objects.
* @param \Drupal\Core\Cache\CacheBackendInterface $render_cache
* Constructor.
* @param \Drupal\Core\Cache\CacheBackendInterface $dynamic_page_cache
* @param \Drupal\Core\Cache\CacheBackendInterface
|null
$dynamic_page_cache
* The captcha service.
*/
public
function
__construct
(
ConfigFactoryInterface
$config_factory
,
CacheBackendInterface
$render_cache
,
CacheBackendInterface
$dynamic_page_cache
)
{
public
function
__construct
(
ConfigFactoryInterface
$config_factory
,
CacheBackendInterface
$render_cache
,
?
CacheBackendInterface
$dynamic_page_cache
)
{
parent
::
__construct
(
$config_factory
);
$this
->
renderCache
=
$render_cache
;
$this
->
dynamicPageCache
=
$dynamic_page_cache
;
...
...
@@ -51,7 +51,7 @@ class PhotoswipeSettings extends ConfigFormBase {
return
new
static
(
$container
->
get
(
'config.factory'
),
$container
->
get
(
'cache.render'
),
$container
->
get
(
'cache.dynamic_page_cache'
)
$container
->
has
(
'cache.dynamic_page_cache'
)
?
$container
->
get
(
'cache.dynamic_page_cache'
)
:
NULL
,
);
}
...
...
@@ -446,7 +446,11 @@ class PhotoswipeSettings extends ConfigFormBase {
// @todo This can probably be more fine graded in the future:
$this
->
renderCache
->
invalidateAll
();
$this
->
dynamicPageCache
->
invalidateAll
();
// If the "Internal Dynamic Page Cache" module isn't installed, the
// dynamicPageCache variable will be NULL:
if
(
$this
->
dynamicPageCache
!==
NULL
)
{
$this
->
dynamicPageCache
->
invalidateAll
();
}
}
/**
...
...
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