Loading src/Entity/SelfEvaluationAnswer.php +13 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Drupal\self_evaluation\Entity; use Drupal\Core\Cache\Cache; use Drupal\Core\Entity\ContentEntityBase; use Drupal\Core\Entity\EntityChangedTrait; use Drupal\Core\Entity\EntityStorageInterface; Loading Loading @@ -142,6 +143,18 @@ class SelfEvaluationAnswer extends ContentEntityBase implements SelfEvaluationAn return $this->get('self_evaluation')->entity; } /** * {@inheritdoc} */ public function getCacheTagsToInvalidate() { $cache_tags = parent::getCacheTagsToInvalidate(); $self_evaluation = $this->getSelfEvaluation(); if ($self_evaluation instanceof SelfEvaluationInterface) { $cache_tags = Cache::mergeTags($cache_tags, $self_evaluation->getCacheTags()); } return $cache_tags; } /** * {@inheritdoc} */ Loading Loading
src/Entity/SelfEvaluationAnswer.php +13 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Drupal\self_evaluation\Entity; use Drupal\Core\Cache\Cache; use Drupal\Core\Entity\ContentEntityBase; use Drupal\Core\Entity\EntityChangedTrait; use Drupal\Core\Entity\EntityStorageInterface; Loading Loading @@ -142,6 +143,18 @@ class SelfEvaluationAnswer extends ContentEntityBase implements SelfEvaluationAn return $this->get('self_evaluation')->entity; } /** * {@inheritdoc} */ public function getCacheTagsToInvalidate() { $cache_tags = parent::getCacheTagsToInvalidate(); $self_evaluation = $this->getSelfEvaluation(); if ($self_evaluation instanceof SelfEvaluationInterface) { $cache_tags = Cache::mergeTags($cache_tags, $self_evaluation->getCacheTags()); } return $cache_tags; } /** * {@inheritdoc} */ Loading