Browse Source

islandora:862 Incorporate PR review suggestion

Co-authored-by: Jordan Dukart <jordan@discoverygarden.ca>
pull/862/head
Alexander O'Neill 3 years ago committed by GitHub
parent
commit
9c8193b75a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      islandora.module

6
islandora.module

@ -251,9 +251,9 @@ function islandora_jsonld_alter_normalized_array(EntityInterface $entity, array
$reaction->execute($entity, $normalized, $context); $reaction->execute($entity, $normalized, $context);
foreach ($context_manager->getActiveContexts() as $context_config) { foreach ($context_manager->getActiveContexts() as $context_config) {
try { try {
if ($context_config->getReaction($reaction->getPluginId()) && isset($context['cacheability']) if ($context_config->getReaction($reaction->getPluginId()) && isset($context[CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY])) {
&& method_exists($context['cacheability'], 'addCacheTags')) { $context[CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY]->addCacheableDependency($context_config);
$context['cacheability']->addCacheTags($context_config->getCacheTags()); };
}; };
} }
catch (PluginNotFoundException $e) { catch (PluginNotFoundException $e) {

Loading…
Cancel
Save