Skip to content
Snippets Groups Projects
Commit a316b4af authored by Pieter Frenssen's avatar Pieter Frenssen
Browse files

Merge remote-tracking branch 'origin/2.0.x' into 3.0.x

parents 7dec8065 bfadffce
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace Drupal\recurring_events_registration\Entity;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Entity\EditorialContentEntityBase;
use Drupal\Core\Entity\EntityChangedTrait;
use Drupal\Core\Entity\EntityStorageInterface;
......@@ -396,4 +397,18 @@ class Registrant extends EditorialContentEntityBase implements RegistrantInterfa
);
}
/**
* {@inheritdoc}
*/
protected function invalidateTagsOnSave($update) {
parent::invalidateTagsOnSave($update);
// The parent method only invalidates list cache tags when a new registrant
// is created. We also need to invalidate the cache tags for the event
// instance and series so that the counters are updated.
if (!$update) {
Cache::invalidateTags($this->getCacheTagsToInvalidate());
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment