Created
July 8, 2015 18:02
-
-
Save nhart/623210d0b1e888fa396b to your computer and use it in GitHub Desktop.
delete objects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$query = <<<EOQ | |
SELECT ?pid | |
FROM <#ri> | |
WHERE { | |
?pid <fedora-rels-ext:isMemberOfCollection> <info:fedora/enter-collection-pid-here>; | |
} | |
EOQ; | |
$connection = islandora_get_tuque_connection(); | |
$results = $connection->repository->ri->sparqlQuery($query); | |
foreach ($results as $result) { | |
$pid = $result['pid']['value']; | |
$connection->repository->purgeObject($pid); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment