Skip to content

Commit

Permalink
Use JsonldNormalizerUtils in context to generate URI (#72)
Browse files Browse the repository at this point in the history
* Use JsonldNormalizerUtils in context to generate URI
* Add conflict with old JSON-LD versions
  • Loading branch information
whikloj authored Oct 5, 2021
1 parent e4f8e6d commit 10d8316
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
"suggest": {
"drupal/name": "Provides western-centric structured names."
},
"conflict": {
"islandora/jsonld": "<2.1.0"
},
"license": "GPL-2.0-or-later",
"authors": [
{
Expand Down
2 changes: 1 addition & 1 deletion controlled_access_terms.module
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function controlled_access_terms_jsonld_alter_normalized_array(EntityInterface $
// We are assuming the first graph is the one corresponding
// to the node/taxonomy_term we are modifying.
$normalized['@graph'][0][$predicate][] = [
'@id' => $referenced_entity->toUrl('canonical', ['absolute' => TRUE])->setRouteParameter('_format', 'jsonld')->toString(),
'@id' => $context['utils']->getEntityUri($referenced_entity),
];
}
}
Expand Down

0 comments on commit 10d8316

Please sign in to comment.