Skip to content

Commit

Permalink
Implement hook_islandora_solution_pack_child_relationships(). (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathangreen authored and DiegoPino committed Oct 9, 2018
1 parent 52a33ad commit 9031139
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions islandora_newspaper.module
Original file line number Diff line number Diff line change
Expand Up @@ -666,3 +666,21 @@ function islandora_newspaper_islandora_paged_content_content_model_registry() {
),
);
}

/**
* Implements hook_islandora_solution_pack_child_relationships().
*/
function islandora_newspaper_islandora_solution_pack_child_relationships($cmodels) {
$relationships = array('predicate' => array(), 'prefix' => array());

if ($cmodels === 'all' || in_array('islandora:newspaperCModel', $cmodels)) {
$relationships['predicate'][] = '<fedora-rels-ext:isMemberOf>';
}

if ($cmodels === 'all' || in_array('islandora:newspaperIssueCModel', $cmodels)) {
$relationships['prefix'][] = 'PREFIX islandora: <http://islandora.ca/ontology/relsext#>';
$relationships['predicate'][] = '<islandora:isPageOf>';
}

return $relationships;
}

0 comments on commit 9031139

Please sign in to comment.