Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WCMS
uw_ct_contact
Commits
c1231b57
Commit
c1231b57
authored
Jun 10, 2021
by
Liam Morland
Browse files
Merge branch '1.0.x' into 'prod/1.0.x'
Tag 1.0.1 See merge request
!12
parents
b1ad5a19
55669104
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/EventSubscriber/UwCtContactEventSubscriber.php
View file @
c1231b57
...
...
@@ -2,6 +2,7 @@
namespace
Drupal\uw_ct_contact\EventSubscriber
;
use
Drupal\Core\Cache\Cache
;
use
Drupal\Core\Entity\EntityTypeManagerInterface
;
use
Drupal\core_event_dispatcher
\
Event\Entity\EntityUpdateEvent
;
use
Drupal\hook_event_dispatcher
\
HookEventDispatcherInterface
;
...
...
@@ -86,6 +87,12 @@ class UwCtContactEventSubscriber implements EventSubscriberInterface {
$profile
->
save
();
}
}
// Invalidate OFIS cache if Contact is unpublished
// and there is watiam value provided.
if
(
!
$contact
->
isPublished
()
&&
$watiam
=
$contact
->
field_uw_ct_contact_watiam_id
->
value
)
{
Cache
::
invalidateTags
([
'uw_wcms_ofis:user:'
.
$watiam
]);
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment